❗❗❗ EXPERIMENTAL ❗❗❗
Prerequisites:
- rust toolchain
- php >= 8.0 (phpdev, php-cli, php-config)
- clang
make install
$instance = Wasm\InstanceBuilder::fromWat(
<<<'EOWAT'
(module
(global $some (export "some") (mut i32) (i32.const 0))
(func (export "get_some") (result i32) (global.get $some))
(func (export "set_some") (param i32) (global.set $some (local.get 0))))
EOWAT
)->build();
var_dump($instance->some);
$instance->some = 1;
var_dump($instance->some);
var_dump($instance->set_some(21));
var_dump($instance->get_some());
php examples/global.php
Check out the examples folder for more examples.
make stubs
You can find a more detailed roadmap here. Feel free to give me some additional keyboards! :)