json-proof-token-js
v0.1.1
Published
A minimal Rust-based JSON Web Proof (JWP) library exposed via JavaScript/TypeScript bindings, inspired by json-proof-token (CyberLinks) crate.
Downloads
9
Readme
json-proof-token-js
A minimal project demonstrating JSON Web Proof (JWP) logic in Rust, exposed via JavaScript/TypeScript bindings. This setup is based on the json-proof-token repository.
Prerequisites
- Rust: Install from rustup.rs. Make sure you have the
wasm32-unknown-unknowntarget installed:rustup target add wasm32-unknown-unknown - Bun (optional): Install from bun.sh.
- Package manager (recommended): @antfu/ni
Or feel free to usenpm i -g @antfu/ninpm,pnpm, oryarn.
Scripts
Build:
nr build(Compiles the Rust code to WASM and bundles the JS.)
Test:
nr testThis runs Rust tests first, then JavaScript tests.
Check (format & lint):
nr check
Development Workflow
- Write and run Rust tests in
src/*.rs(or thetestsmodule). - Use
nr buildto rebuild the WASM package. - Write and run JavaScript tests in
test/*.test.ts. - Once everything passes, we can consider publishing (strategy TBD).
Happy coding!
