Pometry / Pometry/Raphtory

TypeScript type definitions and Bun runtime support for raphtory-js

Open
#2,547 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
642
Forks
70
Avg merge
2d 13h
Merged PRs (30d)
21

Description

Summary

As raphtory-js (WASM bindings) matures, it would be great to have first-class TypeScript and Bun support:

  1. 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.

  2. 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.compileStreaming compatibility
    • ESM import of the generated .wasm module
    • Any Node-specific APIs (e.g. fs, path) used in the JS glue code should have Bun equivalents or be abstracted
  3. npm publishing — Related to #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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the raphtory-js WASM bindings, generated JS glue, package.json, and CI configuration; compare the current wasm-bindgen output with the requested --typescript and Bun entry points. Done means the package exposes usable .d.ts types, loads under Bun and Node, has CI coverage, and documents or completes npm publishing with the requested exports map.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, rust, typescript, wasm
Domain
build-system, ci-cd, release, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.