Skip to content

Build the Encryptoglyph WASM package for Node - #28

Merged
GoDeskio merged 2 commits into
mainfrom
cursor/wasm-node-build-16b7
Nov 14, 2026
Merged

GoDeskio merged 2 commits into
mainfrom
cursor/wasm-node-build-16b7

Conversation

@GoDeskio

Copy link
Copy Markdown
Owner

Product tie: Encryptoglyph, the shared at-rest envelope used by Konektor.

wasm-pack build --target nodejs failed on commit 9a9ac40 because rand_core 0.10 pulls getrandom 0.4, and that crate does not compile for wasm32-unknown-unknown unless wasm_js is enabled. The existing getrandom/js feature only applies to the direct 0.2 dependency.

This adds a wasm32-only dependency on getrandom 0.4 with wasm_js, plus npm run build:wasm:node and a line in the README that runs vector-test.cjs against that output.

Local check after the change:

wasm-pack build crates/encryptoglyph --target nodejs --out-dir /tmp/eg-pkg -- --features wasm
node bindings/ts/vector-test.cjs /tmp/eg-pkg
wasm vectors OK

v1, v2, and v3 in testvectors/envelope.json decrypt to hello encryptoglyph. rewrap of the v1 vector starts with magic 45470303.

Open in Web Open in Cursor 

cursoragent and others added 2 commits November 14, 2026 20:41
Enable getrandom 0.4 wasm_js so the locked graph compiles to wasm32, and add a nodejs wasm-pack script next to the bundler target.
@GoDeskio
GoDeskio merged commit 3d0207d into main Nov 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants