aboutsummaryrefslogtreecommitdiffhomepage
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
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.
-rw-r--r--README.md12
-rw-r--r--composer.json2
-rw-r--r--composer.lock50
-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
9 files changed, 1 insertions, 110 deletions
diff --git a/README.md b/README.md
index dcd652e..7dd871f 100644
--- a/README.md
+++ b/README.md
@@ -24,18 +24,6 @@ $ composer example:php-on-wasm
```
-### RubyVM on PHP on Wasm
-
-https://github.com/m3m0r7/rubyvm-on-php is a RubyVM written in pure PHP.
-
-It works on the PHP runtime on my Wasm runtime.
-
-```
-$ composer install
-$ composer example:rubyvm-on-php-on-wasm
-```
-
-
## Talks
diff --git a/composer.json b/composer.json
index 4167646..c08a83e 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,6 @@
"php": ">=8.4"
},
"require-dev": {
- "m3m0r7/rubyvm-on-php": "^0.3.3",
"phpstan/phpstan": "^2.1.39",
"phpstan/phpstan-deprecation-rules": "^2.0.4",
"phpstan/phpstan-strict-rules": "^2.0.10",
@@ -39,7 +38,6 @@
"ecsfix": "ecs --memory-limit=1G check --fix",
"example:hello-world": "@php examples/hello-world/index.php",
"example:php-on-wasm": "@php -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php",
- "example:rubyvm-on-php-on-wasm": "@php -d memory_limit=-1 -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=2G examples/rubyvm-on-php-on-wasm/php-wasm.php",
"lint": [
"@ecs",
"@phpstan"
diff --git a/composer.lock b/composer.lock
index bab1644..dba5426 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8c47dacf7656b69efedeb6b1da1eba78",
+ "content-hash": "81f3515ffeb5ece39d86093223a4d528",
"packages": [],
"packages-dev": [
{
@@ -1223,54 +1223,6 @@
"time": "2026-01-15T06:54:53+00:00"
},
{
- "name": "m3m0r7/rubyvm-on-php",
- "version": "0.3.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/m3m0r7/rubyvm-on-php.git",
- "reference": "a568cabf4b71e7f8a3efebcaa3b77ea2c8bc2f5c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/m3m0r7/rubyvm-on-php/zipball/a568cabf4b71e7f8a3efebcaa3b77ea2c8bc2f5c",
- "reference": "a568cabf4b71e7f8a3efebcaa3b77ea2c8bc2f5c",
- "shasum": ""
- },
- "require": {
- "monolog/monolog": "^3.4",
- "php": ">=8.2",
- "symfony/console": "^6.3"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^3.21",
- "phpstan/phpstan": "^1.10",
- "phpunit/phpunit": "^10.2",
- "rector/rector": "^0.18.3",
- "squizlabs/php_codesniffer": "^3.7"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "RubyVM\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "m3m0r7",
- "homepage": "https://i.mem.ooo"
- }
- ],
- "support": {
- "issues": "https://github.com/m3m0r7/rubyvm-on-php/issues",
- "source": "https://github.com/m3m0r7/rubyvm-on-php/tree/0.3.3.0"
- },
- "time": "2023-12-28T04:25:48+00:00"
- },
- {
"name": "monolog/monolog",
"version": "3.8.1",
"source": {
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