Skip to content

Integrate WASM-based Prism parser into standard build#9374

Merged
headius merged 26 commits intomasterfrom
wasm_prism
Apr 20, 2026
Merged

Integrate WASM-based Prism parser into standard build#9374
headius merged 26 commits intomasterfrom
wasm_prism

Conversation

@headius
Copy link
Copy Markdown
Member

@headius headius commented Apr 15, 2026

This continues the integration of Prism parser wrapper libraries from the jruby-prism project by shading it in and including the new WASM support and Chicory libraries.

This is a prototype of how it should eventually look and this PR is intended to iterate.

Notable behavior changes so far:

  • If the prism parser is enabled with -Xparser.prism but the dynamic library is not configured or present, it will fall back on the wasm parser.
  • If the prism parser is enabled with -Xparser.prism.wasm the wasm parser will be used.
  • The parser statistics output now prints the actual parser class in use.
  • All dependencies are shaded in and moved to internal packages as appropriate.

The artifacts this depends on comes from:

  • prism: This project pushes Maven artifacts to org.ruby-lang namespace: prism-parser-api (the API) and prism-parser-wasm (the WASM backend for that API).
  • jruby-prism: The 2.0.0 release (org.jruby:jruby-prism-parser) and higher are based on the above prism artifacts.

headius and others added 21 commits February 23, 2026 16:15
This integrates jruby-prism 2.0 by shading it into our main JRuby
jar and loading it from there. Incoming packages considered to be
for internal use are moved under `org.jruby.internal`. The output
of parser statistics now shows the actual class of the parser,
since either or both can be activated now.
If this is parsed by Prism, it's a ProgramNode contained in a
ParseResult, so just use the ParseResult.
enebo and others added 2 commits April 19, 2026 08:36
Probably just missing some place where warn should be called during
parse. We'll fix it in post.
headius added 3 commits April 20, 2026 08:01
JRuby 10.0.5.0 moves to "provided" scope in jruby-prism, since it
is only needed to compile.
This should resolve the remaining issues with dependency
convergence.
@headius headius merged commit 41599e1 into master Apr 20, 2026
218 checks passed
@headius headius deleted the wasm_prism branch April 20, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants