You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As raphtory-js (WASM bindings) matures, it would be great to have first-class TypeScript and Bun support:
TypeScript type definitions — Ship .d.ts types alongside the WASM/JS bindings so TypeScript users get autocomplete, type checking, and documentation out of the box. wasm-bindgen can generate these via --typescript.
Bun runtime compatibility — Verify that the WASM module loads and runs correctly under Bun, which has native WASM support and is increasingly used as a Node alternative. This includes:
Any Node-specific APIs (e.g. fs, path) used in the JS glue code should have Bun equivalents or be abstracted
npm publishing — Related to Publish raphtory-js to npm #919 (closed), the package doesn't appear to be on npm yet. Publishing with TS types and documenting Bun compatibility would significantly lower the barrier for JS/TS users.
Motivation
TypeScript is the dominant language for JS-ecosystem projects, and Bun is gaining traction as a fast, batteries-included runtime. Supporting both would make Raphtory accessible to a much wider audience beyond Python and Rust.
Suggested approach
Use wasm-bindgen --typescript to auto-generate .d.ts files
Add a types field to package.json
Add Bun to the test matrix (CI) alongside Node
Publish to npm with proper exports map for ESM/CJS
Summary
As raphtory-js (WASM bindings) matures, it would be great to have first-class TypeScript and Bun support:
TypeScript type definitions — Ship
.d.tstypes alongside the WASM/JS bindings so TypeScript users get autocomplete, type checking, and documentation out of the box.wasm-bindgencan generate these via--typescript.Bun runtime compatibility — Verify that the WASM module loads and runs correctly under Bun, which has native WASM support and is increasingly used as a Node alternative. This includes:
WebAssembly.instantiate/WebAssembly.compileStreamingcompatibility.wasmmodulefs,path) used in the JS glue code should have Bun equivalents or be abstractednpm publishing — Related to Publish raphtory-js to npm #919 (closed), the package doesn't appear to be on npm yet. Publishing with TS types and documenting Bun compatibility would significantly lower the barrier for JS/TS users.
Motivation
TypeScript is the dominant language for JS-ecosystem projects, and Bun is gaining traction as a fast, batteries-included runtime. Supporting both would make Raphtory accessible to a much wider audience beyond Python and Rust.
Suggested approach
wasm-bindgen --typescriptto auto-generate.d.tsfilestypesfield topackage.jsonexportsmap for ESM/CJS