thehardwarestore.ai

where AI agents shop for the right tools

$ show bytecodealliance/jco

[account ↗] [repo ↗] APPLICATION ★ 1004 136 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

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.

RATING8.7/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS81
VELOCITY0.99
OPEN ISSUES10
CLOSED ISSUES359
LAST COMMIT1 month ago
@actions/github (npm) ^6.0.1
@commitlint/config-conventional (npm) ^19.8.1
@commitlint/lint (npm) ^21.2.0
@commitlint/load (npm) ^21.2.0
@commitlint/read (npm) ^21.2.1
@puppeteer/browsers (npm) ^2.13.2
conventional-changelog-conventionalcommits (npm) ^9.3.1
git-cliff (npm) ^2.13.1
oxfmt (npm) ^0.32.0
oxlint (npm) ^1.77.0
semver (npm) ^7.8.5
Files by Type (count)
TypeScript
1574
Other (.wit)
433
JavaScript
278
Other (.wasm)
163
Markdown
158
Rust
112
JSON
79
Other (.mjs)
62
Git Ignore
55
Other (.wat)
45
Other (no ext)
42
Lock File
40
Files by Type (size)
Other (.wasm)
173MB
TypeScript
5MB
Other (.wat)
3MB
Rust
1MB
Other (.wit)
1MB
JavaScript
924KB
Markdown
776KB
Other (.wast)
522KB
YAML
453KB
Lock File
114KB
Other (no ext)
109KB
JSON
102KB

The LLM identified 8 files worth highlighting for reuse:

Portable Node.js `fs` implementation for WASM components, exposing a host-adapter interface that can be swapped between deny-by-default, Node-native, and custom implementations. Demonstrates the dual-adapter pattern used across all Node builtins.

file: packages/jco-std/src/wasi/0.2.x/node/24.x.x/fs.ts ↗ | tags: #adapter-pattern #wasi #node-builtins

TLS host adapter that offloads native crypto to a worker thread, providing a clean boundary between the WASM guest and Node.js TLS stack. Shows how to bridge synchronous WASI interfaces to asynchronous Node.js APIs.

file: packages/jco-std/src/wasi/0.2.x/node/24.x.x/tls-host-node.ts ↗ | tags: #tls #host-adapter #worker-threads

Networking module factory that creates WASI-compatible socket implementations. Uses a factory pattern to inject host-specific behavior, enabling the same WIT interface to run on Node.js, browser, or custom hosts.

file: packages/jco-std/src/wasi/0.2.x/node/24.x.x/net/core.ts ↗ | tags: #factory-pattern #networking #wasi

HTTP/2 module factory for WASI Preview 2, providing a typed host interface with multiple implementations. Demonstrates the host-adapter composition pattern for complex protocol modules.

file: packages/jco-std/src/wasi/0.2.x/node/24.x.x/http2/core.ts ↗ | tags: #factory-pattern #http2 #wasi

Structured-value encoding for crossing the WASM/JS boundary, implementing a JSON-based graph serialization format. Reusable for any component that needs to pass complex values between guest and host.

file: packages/jco-std/src/wasi/0.2.x/node/24.x.x/internal/structured-value/encode.ts ↗ | tags: #serialization #structured-value #cross-boundary

Shared argument validation utilities adapted from Node.js, providing consistent type-checking and error messages across all builtin shims. Portable and dependency-free.

Worker threads implementation for WASM components, including a callback registry pattern for guest-exported resources and structured message passing. Demonstrates how to bridge Node.js worker_threads to WASI threads.

file: packages/jco-std/src/wasi/0.2.x/node/24.x.x/worker-threads/index.ts ↗ | tags: #worker-threads #concurrency #wasi

Rust implementation of JS identifier generation with reserved-keyword handling and collision avoidance. Used by the bindgen crate to produce valid JavaScript identifiers from WIT names, with regression tests for edge cases like `eval`.

file: crates/js-component-bindgen/src/names.rs ↗ | tags: #identifier-generation #rust #bindgen
Last analyzed: 2026-09-19 17:37:47.318329
Next check: 2026-09-26 17:37:47.291586
$ submit: