-
Notifications
You must be signed in to change notification settings - Fork 1
Tweaks to WASM-based build for JVM #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: topic/javawasm_changes
Are you sure you want to change the base?
Tweaks to WASM-based build for JVM #1
Conversation
org.jruby:chicory-prism
Nodes need access to RubySymbol and support APIs at least.
* It is a resource used as source code (in wasm) that is compiled for the project artifact. * Added to Rake CLOBBER
| with: | ||
| name: prism.wasm | ||
| path: java-wasm/src/test/resources/prism.wasm | ||
| path: java-wasm/src/main/resources/prism.wasm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prism.wasm file was very intentionally placed in test so that it doesn't get included in the resulting jar (it's redundant).
The Chicory compiler already generates a org/prism/PrismParser.meta file that is smaller and contains everything needed for execution.
| instance = Instance.builder(module) | ||
| .withMemoryFactory(limits -> new ByteArrayMemory(new MemoryLimits(10, MemoryLimits.MAX_PAGES))) | ||
| .withMachineFactory(PrismModule::create) | ||
| .withMachineFactory(parser.machineFactory()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: .withMachineFactory(PrismParser::create)
| @@ -1,11 +1,12 @@ | |||
| package org.prism; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but you might want to align the package name to the new groupId.
Bit of cleanup and documentation here mostly.
org.jruby.chicory-prism.RubySymbol.java-wasmbuild output tojava-wasm/src/main/resources.