Implement JavaScript/Node.js runtime with unified OCI workflow#29
Merged
Conversation
Add JavaScript/Node.js runtime support using jco componentize with SpiderMonkey, following the same multi-layer OCI pattern as the Python runtime: - Layer 0: Pre-built runtime WASM (SpiderMonkey via jco) - Layer 1+: User source code (tar.gz) Key changes: Runtime & Examples: - Add examples/runtimes/nodejs/ - the Node.js runtime implementation - Add examples/nodejs-hello/ - example user application - Runtime loads user code from /app at startup via WASI filesystem Unified OCI Workflow: - Remove run_fabrickfile endpoint - everything now goes through OCI storage - CLI service run and run commands now use run_module endpoint - Consistent handling for both compiled and interpreted modules Code Changes: - fabricksd: Remove RunFabrickfileRequest, run_fabrickfile handler and route - fabricksd: Remove ServiceManager::run_fabrickfile method - fabricksd: Refactor run_module handler for clippy compliance - fabricks CLI: Update run.rs to use resolve_module_reference - fabricks CLI: Make ModuleSource and resolve_module_reference public - Fix unrelated async issue in fabricks-e2e helpers Documentation: - Add docs/interpreted-runtimes.md - comprehensive guide - Update cli-reference.md with service run command - Update daemon-api-reference.md with run-module endpoint - Update fabrickfile-mortar-reference.md with runtime section - Update example READMEs with architecture explanations Closes #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run_fabrickfileendpoint)Changes
JavaScript/Node.js Runtime
examples/runtimes/nodejs/- Runtime implementation using jco/SpiderMonkeyexamples/nodejs-hello/- Example user applicationUnified OCI Workflow
run_fabrickfileendpoint from daemon APIservice runandruncommands now userun_moduleendpointDocumentation
docs/interpreted-runtimes.md- Complete guide for JS/Python runtimesservice runcommandrun-moduleendpoint[runtime]sectionTest plan
fabricks service run examples/hello-http- Rust HTTP servicefabricks service run examples/hello-world- Rust command servicefabricks service run examples/python-hello- Python interpretedfabricks service run examples/nodejs-hello- JavaScript interpretedfabricks mortar up examples/hello-http- Single service mortarfabricks mortar up examples/e-commerce- Multi-service mortar (5 services)Closes #25