$ account bytecodealliance
Jco is a JavaScript toolchain for WebAssembly components. It transpiles WASM components to JavaScript, generates TypeScript types from WIT, bundles components, and provides a standard library (`jco-std`) that ports Node.js built-in modules (fs, http, tls, net, crypto, zlib, etc.) to run inside WebAssembly components via WASI Preview 2/3. The monorepo contains a Rust workspace (bindgen crates, test components) and TypeScript packages (jco CLI, jco-transpile, preview2-shim, preview3-shim, jco-std). The codebase is notable for its differential testing approach: shims are tested against native Node.js behavior, with tests for HTTP/2, TLS, SQLite, streams, and worker threads. A dual-adapter pattern (deny-by-default vs. Node-native) ensures security by default. The project supports multiple WASI versions (0.2.x, 0.3.x) and Node.js versions (24.x, 26.x), with dedicated shims for browser and Node.js runtimes. Maintenance is active (recent commits, CI workflows), but there are drift risks: pinned Node.js versions, many TODO comments, incomplete browser shims (throwing Todo), and experimental features like JSPI and async support.
wac is a CLI tool and library for composing WebAssembly components using the WAC language, a declarative superset of WIT. It parses .wac files, resolves package references from the filesystem or a Warg registry, builds a directed acyclic composition graph, and encodes the result into a valid WebAssembly component binary (.wasm). The system is modular, with four core crates: wac-parser (lexer, AST, name resolution), wac-resolver (package resolution with filesystem and registry backends), wac-graph (graph representation and binary encoding), and wac-types (type system, subtype checking, semver-aware type aggregation). The CLI exposes commands such as `plug`, `compose`, `targets`, `parse`, and `resolve`, each targeting a specific composition workflow. The architecture follows a pipeline: WAC source text → lexing/parsing → AST resolution (name binding, type checking) → composition graph construction → binary encoding. The resolver supports both local `.wat`/`.wasm` files and remote packages from a Warg registry (feature-gated). The type system includes full component model types (primitives, records, variants, resources, streams, futures, functions, interfaces, worlds) with async function support and semver-aware compatibility checks. The composition graph handles imports, instantiations, aliases, exports, and argument wiring, and can merge compatible imports from multiple packages. External dependencies include the Bytecode Alliance ecosystem: wit-parser, wasmparser, wit-component, wasm-encoder, wasmprinter, wat, and optionally warg-client and warg-protocol for registry support. The project is actively developed with extensive test coverage, including roundtrip parsing, resolution error cases, graph encoding, and registry integration tests. It is published on crates.io and provides prebuilt binaries for Linux, macOS, and Windows.