diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-16 01:08:44 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-16 01:08:44 +0900 |
| commit | 08ddaf4597ad3a9d22433625d11d14bde1dfeafe (patch) | |
| tree | bd58f4bc802f8bed3a6910bd1e4f7f52486b20fb /examples/rubyvm-on-php-on-wasm/php-wasm.php | |
| parent | a6b728b62efa909b69d9a306e1a955c9d1213446 (diff) | |
| download | php-waddiwasi-08ddaf4597ad3a9d22433625d11d14bde1dfeafe.tar.gz php-waddiwasi-08ddaf4597ad3a9d22433625d11d14bde1dfeafe.tar.zst php-waddiwasi-08ddaf4597ad3a9d22433625d11d14bde1dfeafe.zip | |
feat: remove RubyVM example
Because the PHP-written RubyVM has not been updated recently and does
not support the latest PHP.
Diffstat (limited to 'examples/rubyvm-on-php-on-wasm/php-wasm.php')
| -rw-r--r-- | examples/rubyvm-on-php-on-wasm/php-wasm.php | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/examples/rubyvm-on-php-on-wasm/php-wasm.php b/examples/rubyvm-on-php-on-wasm/php-wasm.php deleted file mode 100644 index 3f5b9d0..0000000 --- a/examples/rubyvm-on-php-on-wasm/php-wasm.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -declare(strict_types=1); - -require_once __DIR__ . '/../../vendor/autoload.php'; - -use Nsfisis\Waddiwasi\Stream\FileStream; -use Nsfisis\Waddiwasi\WebAssembly\Execution\Runtime; - -const PHP_HELLO_WORLD = <<<'EOS' -require_once '%DIR%/HelloWorld.php'; -EOS; - -$wasmBinaryStream = new FileStream(__DIR__ . '/php-wasm.wasm'); - -$linker = require_once __DIR__ . '/emscripten_bridge.php'; - -$runtime = Runtime::instantiateFromStream($wasmBinaryStream, $linker); -$codePtr = allocateStringOnWasmMemory($runtime, strtr(PHP_HELLO_WORLD, [ - '%DIR%' => __DIR__, -])); - -$results = $runtime->invoke('php_wasm_run', [$codePtr]); -\assert(\count($results) === 1); -$exitCode = $results[0]; -\assert(\is_int($exitCode)); |
