Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ pytest
cd bindings/ts
npm run build:wasm
npm run build
# Node services use the CommonJS package instead of the bundler target:
npm run build:wasm:node
node vector-test.cjs pkg-node
```

```ts
Expand Down
1 change: 1 addition & 0 deletions bindings/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"types": "dist/index.d.ts",
"scripts": {
"build:wasm": "wasm-pack build ../../crates/encryptoglyph --target bundler --out-dir ../../bindings/ts/pkg -- --features wasm",
"build:wasm:node": "wasm-pack build ../../crates/encryptoglyph --target nodejs --out-dir ../../bindings/ts/pkg-node -- --features wasm",
"build": "tsc -p ."
}
}
3 changes: 3 additions & 0 deletions crates/encryptoglyph/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions crates/encryptoglyph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ getrandom = "0.2"
wasm-bindgen = { version = "0.2", optional = true }
fpe = "0.6.1"
blahaj = "0.7"

# rand_core 0.10 pulls getrandom 0.4, which has no `js` feature. Enabling
# `wasm_js` on that version lets the wasm32 build use the locked graph.
# The direct 0.2 dependency stays named `getrandom` for getrandom::getrandom.
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
getrandom04 = { package = "getrandom", version = "0.4", features = ["wasm_js"] }
Loading