{"id":16381042,"url":"https://github.com/jasl/mruby_wasi","last_synced_at":"2026-06-19T12:31:38.693Z","repository":{"id":141659366,"uuid":"473553936","full_name":"jasl/mruby_wasi","owner":"jasl","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-29T19:31:43.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-15T05:53:17.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-24T10:16:58.000Z","updated_at":"2022-03-24T10:22:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"52b3c301-2f7b-412d-995c-f5ce5bcce538","html_url":"https://github.com/jasl/mruby_wasi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fmruby_wasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fmruby_wasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fmruby_wasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fmruby_wasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasl","download_url":"https://codeload.github.com/jasl/mruby_wasi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240062572,"owners_count":19742218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T03:53:13.359Z","updated_at":"2025-11-11T12:34:32.320Z","avatar_url":"https://github.com/jasl.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mr.Engifar\n====\n\n\u003e Building...\n\nAn experimental mruby script engine built on WASM.\nExpects to run both on Browser and Server-side and offer affordable performance.\n\n## Build\n\n### Emscripten\n\n#### Preparation\n\n- CRuby 2.6+\n- `emcc`, `em++` and `emar` available\n  - [Installation instructions using the emsdk](https://emscripten.org/docs/getting_started/downloads.html#installation-instructions-using-the-emsdk-recommended)\n\n#### Build\n\n`WASM_TARGET=emscripten rake`\n\n### WASI\n\n\u003e Because of WASI lacking exception-handling or setjmp/longjmp support, it's unusable at this time.\n\n#### Preparation\n\n- CRuby 2.6+\n- https://github.com/WebAssembly/wasi-sdk\n- https://github.com/WebAssembly/binaryen\n- You must set `WASI_SDK_PATH` env\n  - e.g. `export WASI_SDK_PATH=\"~/opt/wasi-sdk-14.0\"`\n- You may need run `rake mrproper` before switching build\n\n#### Build with `Asyncify`\n\n\u003e It's broken, because I'm not understand how to integrate Asyncify\n\nBuild mruby\n\n`ASYNCIFY=1 rake`\n\nRun `wasm-opt` (from Binaryen)\n\n`wasm-opt -g --asyncify -O3 --pass-arg=asyncify-ignore-imports -o bin/mruby.wasm mruby/build/wasm32-unknown-wasi/bin/mruby.wasm`\n\n*Disable optimization may get error `Invalid input WebAssembly code at offset 2464055: locals exceed`*\n\n### Build without `Asyncify`\n\n\u003e It's only stubbed `setjmp \u0026 longjmp` so it will crash when Ruby's exception raised\n\n`rake`\n\n## Play\n\nTODO\n\n## References\n\n- https://eng-blog.iij.ad.jp/archives/10875\n- https://itnext.io/final-report-webassembly-wasi-support-in-ruby-4aface7d90c9\n  - https://github.com/Ruby/Ruby/pull/5407\n  - https://github.com/ruby/ruby/tree/master/wasm\n- https://kripken.github.io/blog/wasm/2019/07/16/asyncify.html\n  - https://github.com/kripken/talks/blob/master/jmp.c\n\n## License\n\nMr.Engifar is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasl%2Fmruby_wasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasl%2Fmruby_wasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasl%2Fmruby_wasi/lists"}