Skip to content

veewee/ext-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WASM Extension for PHP

❗❗❗ EXPERIMENTAL ❗❗❗

Installation

cargo build
cargo php install

Usage

$instance = new Wasm\WasmInstance(
    <<<'EOWAT'
    (module
      (type $t0 (func (param i32) (result i32)))
      (func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32)
        get_local $p0
        i32.const 1
        i32.add))
    EOWAT
);

var_dump($instance->add_one(42));
php -d extension=./target/debug/libext_wasm.dylib examples/function.php

Stubs

cargo php stubs

Releases

No releases published

Sponsor this project

 

Contributors 4

  •  
  •  
  •  
  •  

Languages