Skip to content

Commit 62ccac2

Browse files
committed
feat(wasm): add wasm bindgen as a feature
1 parent c0b6db7 commit 62ccac2

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.11.2 - 17-05-2024
2+
3+
* Add wasmbindgen feature to not expose the library as a javascript module when used as a dependency by default
4+
15
## 2.11.1 - 17-05-2024
26

37
* Fix request time in proxy log to work with millisecond precision

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ default = ["compress", "router"]
2626
compress = ["dep:brotli", "dep:flate2"]
2727
router = []
2828
dot = ["dep:dot_graph"]
29+
wasmbind = []
2930

3031
[target.'cfg(target_arch = "wasm32")'.dependencies]
3132
chrono = { version = "0.4.19", features = ["serde", "wasmbind"] }

Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ install: @RUST_TARGET_DIR@/@RUST_TARGET_SUBDIR@/libredirectionio.a redirectionio
3737
install -c -m 644 libredirectionio.pc $(DESTDIR)@libdir@/pkgconfig/
3838

3939
build-wasm:
40-
wasm-pack build --scope redirection.io --no-default-features --out-dir pkg/wasm --no-pack --release
40+
wasm-pack build --scope redirection.io --no-default-features --out-dir pkg/wasm --no-pack --release --features wasmbind
4141

4242
.PHONY: clean
4343
clean:

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ mod dot;
2222
mod ffi_helpers;
2323
mod regex;
2424
mod router_config;
25+
#[cfg(feature = "wasmbind")]
2526
#[cfg(target_arch = "wasm32")]
2627
mod wasm_api;
2728

0 commit comments

Comments
 (0)