bytecodealliance / jco
JavaScript toolchain for working with WebAssembly Components
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing bytecodealliance/jco in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewjco JavaScript tooling for WebAssembly Components A Bytecode Alliance project Contributing | Chat on Zulip Overview Jco ( ) provides a [Javascript][js]-native toolchain for working with [WebAssembly Components][cm-book]. **Jco aims to be a convenient multi-tool for the JS WebAssembly ecosystem.** With Jco (and related projects in this repository), you can: • **Build WebAssembly components** from Javascript/Typescript with the help of [ ][cjs] • **"Transpile" WebAssembly components** into ES modules that can run in environments like NodeJS and the browser, combining platform-native WebAssembly core support with the advanced features of WebAssembly Components • **Run WebAssembly components** whether single-shot applications or web servers (similar to [ ][wasmtime-run]/[ ][wasmtime-serve]) • **Reuse WebAssembly component workflows** (e.g. building components, transpiling, etc) from your own JS projects • **Utilize [ ][wt]** as a library from JS [cm-book]: https://component-model.bytecodealliance.org/ [js]: https://developer.mozilla.org/en-US/docs/Web/JavaScript [cjs]: https://github.com/bytecodealliance/componentize-js [wt]: https://github.com/bytecodealliance/wasm-tools [wasmtime-serve]: https://docs.wasmtime.dev/cli-options.html#serve [wasmtime-run]: https://docs.wasmtime.dev/cli-options.html#run Organization As Jco aims to do many things, it contains many subprojects that are organized in this repository: | Subproject | Language | Directory | Description | |----------------------------------|------------|-----------------------------------------|-------------------------------------------------------------------------------------------------| | | Javascript | | The CLI | | | Javascript | | WebAssembly Component Transpilation functionaltiy | | | Javascript | | Library that provides a mapping of [WASI Preview 2][wasi-p2] for NodeJS and Browsers | | | Javascript | | Library that provides a mapping of WASI Preview 3 for NodeJS | | | Rust | | Enables and other features, reusing the Rust WebAssembly ecosystem | | | Rust | | WebAssembly component that (when transpiled) makes available in JS | | | Rust | | WebAssembly component containing pieces of [ ][wt] used by | [wasi-p2]: https://github.com/WebAssembly/WASI/blob/main/docs/Preview2.md Quickstart Jco can be used as either a library import or as a CLI via the command. To install it, use (or your favorite equivalent): > [!NOTE] > If you're using jco to build components, you should also install , which is dynamically imported: > > Building an example component For instructions on how to build an example component, see the [Component model section on Javascript][cm-book-js]. To see examples of common patterns, check out the example components folder ( ). [cm-book-js]: https://component-model.bytecodealliance.org/language-support/javascript.html Learn more For a deeper guide on the intricacies of Jco, read the [Jco Book][jco-book]. [jco-book]: https://bytecodealliance.github.io/jco/ Installation quirks Node 18.x If installing on Node 18.x with a version of 0.18.3 or above, you may need to install manually. For example, on linux this would mean the following: It may be necessary to replace with whatever platform is appropriate. > [!NOTE] > Similar installation issues may occur if using an version older than 11.3.0, > due to [ bugs related to optional dependencies][npm-opt-deps-issues] [npm-opt-deps-issues]: https://github.com/npm/cli/issues/4828 License This project is licensed under the Apache 2.0 license with the LLVM exception. See LICENSE for more details. Contributing See the Contributing chapter of the Jco book. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.