@@ -21,24 +21,28 @@ path = "src/lib.rs"
2121
2222[dependencies ]
2323jpeg-decoder = " 0.3.2"
24- lopdf = { version = " 0.38.0" , default-features = false }
2524miniz_oxide = " 0.8.9"
2625png = " 0.18.0"
2726
28- # WASM support - automatically enabled when targeting wasm32-unknown-unknown
27+ # Target-specific configuration to ensure correct behavior without consumer-side feature flags
28+ # For non-WASM targets, use lopdf with its default native features
29+ [target .'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))' .dependencies ]
30+ lopdf = { version = " 0.38.0" }
31+
32+ # For wasm32-unknown-unknown, enable lopdf's wasm_js mode and getrandom's wasm_js support
2933[target .'cfg(all(target_arch = "wasm32", target_os = "unknown"))' .dependencies ]
30- getrandom = { version = " 0.3 " , features = [" wasm_js" ] }
34+ lopdf = { version = " 0.38.0 " , default-features = false , features = [" wasm_js" ] }
3135
3236[dev-dependencies ]
3337png = { version = " 0.18.0" , features = [" unstable" ] }
3438wasm-bindgen-test = " 0.3"
3539
3640[features ]
37- default = [ " native " ]
38- # Enable WASM support for lopdf when targeting WASM
39- wasm_js = [" lopdf/wasm_js " ]
40- # Default features for non-WASM targets
41- native = [" lopdf/default " ]
41+ # No feature flags are required by consumers; behavior is selected automatically by target.
42+ # These are kept empty for backward compatibility so enabling them has no effect.
43+ default = []
44+ wasm_js = []
45+ native = []
4246
4347# Test configuration
4448[package .metadata .docs .rs ]
0 commit comments