forked from mozilla/sandboxed-regexp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
23 lines (17 loc) · 746 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# No school like the old school...
build: pkg/sandboxed-regexp.js
pkg/sandboxed-regexp.js: src/lib.rs src/sandboxed-regexp.js Cargo.toml
# We use a custom smaller-than-normal stack size in the hope of reducing memory usage.
# This might prove to be a bad idea in practice...
RUSTFLAGS="-C link-arg=-zstack-size=16384" wasm-pack build --target nodejs --release --out-name="sandboxed-regexp" --no-typescript
#wasm-pack build --target nodejs --release --out-name="sandboxed-regexp" --no-typescript
# We have our own custom JS wrapper, overwrite the generated one.
cp src/sandboxed-regexp.js pkg/sandboxed-regexp.js
test: build
node ./src/test.js
bench: build
node ./tools/bench.js
clean:
rm -rf ./pkg
publish:
cd ./pkg && npm publish