Skip to content

Implement Chicory WASM backend for the Ruby API#4017

Draft
headius wants to merge 2 commits intoruby:mainfrom
jruby:wasm_gem
Draft

Implement Chicory WASM backend for the Ruby API#4017
headius wants to merge 2 commits intoruby:mainfrom
jruby:wasm_gem

Conversation

@headius
Copy link
Contributor

@headius headius commented Mar 19, 2026

This PR will provide a new Ruby API backend (in addition to the C extension and the FFI wrapper) based on the Chicory WASM runtime for the JVM.

This version of the gem will be published for JRuby users as the default cross-platform gem. Future gems will make platform-specific binary builds available for users that desire the additional performance.

The goal here is to get a native-code free version of the prism gem released for JRuby users.

@kddnewton kddnewton added the java Pull requests that update Java code label Mar 19, 2026
@headius
Copy link
Contributor Author

headius commented Mar 19, 2026

This depends upon changes in #3944 and will be rebased once that merges to main.

@eregon
Copy link
Member

eregon commented Mar 19, 2026

I wonder if it'd make sense to support the WASM case in lib/prism/ffi.rb directly and e.g. define LibRubyParser as WASM::PRISM or so in that case, or to share some of the logic.
This looks like an early prototype as much of the logic is copied and probably not working yet (since it refers LibRubyParser and that's not set in the new file).

@headius
Copy link
Contributor Author

headius commented Mar 19, 2026

This looks like an early prototype

Yes, that's why it's a draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants