aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/rubyvm-on-php-on-wasm
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-16 01:08:44 +0900
committernsfisis <nsfisis@gmail.com>2026-02-16 01:08:44 +0900
commit08ddaf4597ad3a9d22433625d11d14bde1dfeafe (patch)
treebd58f4bc802f8bed3a6910bd1e4f7f52486b20fb /examples/rubyvm-on-php-on-wasm
parenta6b728b62efa909b69d9a306e1a955c9d1213446 (diff)
downloadphp-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')
-rw-r--r--examples/rubyvm-on-php-on-wasm/HelloWorld.php18
-rw-r--r--examples/rubyvm-on-php-on-wasm/HelloWorld.rb1
-rw-r--r--examples/rubyvm-on-php-on-wasm/HelloWorld.yarvbin221 -> 0 bytes
l---------examples/rubyvm-on-php-on-wasm/emscripten_bridge.php1
-rw-r--r--examples/rubyvm-on-php-on-wasm/php-wasm.php26
l---------examples/rubyvm-on-php-on-wasm/php-wasm.wasm1
6 files changed, 0 insertions, 47 deletions
diff --git a/examples/rubyvm-on-php-on-wasm/HelloWorld.php b/examples/rubyvm-on-php-on-wasm/HelloWorld.php
deleted file mode 100644
index b237637..0000000
--- a/examples/rubyvm-on-php-on-wasm/HelloWorld.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-require_once __DIR__ . '/../../vendor/autoload.php';
-
-\define('STDIN', fopen('php://stdin', 'r'));
-
-$rubyVM = new \RubyVM\VM\Core\Runtime\RubyVM(
- new \RubyVM\VM\Core\Runtime\Option(
- reader: new \RubyVM\VM\Stream\BinaryStreamReader(
- streamHandler: new \RubyVM\VM\Stream\FileStreamHandler(
- __DIR__ . '/HelloWorld.yarv',
- ),
- ),
- logger: new \Psr\Log\NullLogger(),
- ),
-);
-$executor = $rubyVM->disassemble();
-$executor->execute();
diff --git a/examples/rubyvm-on-php-on-wasm/HelloWorld.rb b/examples/rubyvm-on-php-on-wasm/HelloWorld.rb
deleted file mode 100644
index f94759e..0000000
--- a/examples/rubyvm-on-php-on-wasm/HelloWorld.rb
+++ /dev/null
@@ -1 +0,0 @@
-puts RubyVM::InstructionSequence.compile("puts 'HelloWorld!\n'", "HelloWorld.rb").to_binary
diff --git a/examples/rubyvm-on-php-on-wasm/HelloWorld.yarv b/examples/rubyvm-on-php-on-wasm/HelloWorld.yarv
deleted file mode 100644
index 4a4cb1c..0000000
--- a/examples/rubyvm-on-php-on-wasm/HelloWorld.yarv
+++ /dev/null
Binary files differ
diff --git a/examples/rubyvm-on-php-on-wasm/emscripten_bridge.php b/examples/rubyvm-on-php-on-wasm/emscripten_bridge.php
deleted file mode 120000
index 3fc7d65..0000000
--- a/examples/rubyvm-on-php-on-wasm/emscripten_bridge.php
+++ /dev/null
@@ -1 +0,0 @@
-../php-on-wasm/emscripten_bridge.php \ No newline at end of file
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));
diff --git a/examples/rubyvm-on-php-on-wasm/php-wasm.wasm b/examples/rubyvm-on-php-on-wasm/php-wasm.wasm
deleted file mode 120000
index 4f254d7..0000000
--- a/examples/rubyvm-on-php-on-wasm/php-wasm.wasm
+++ /dev/null
@@ -1 +0,0 @@
-../compile-php-to-wasm/php-wasm.wasm \ No newline at end of file