diff --git a/color-module/Cargo.toml b/color-module/Cargo.toml index a89230f..51e2a8d 100644 --- a/color-module/Cargo.toml +++ b/color-module/Cargo.toml @@ -10,6 +10,8 @@ crate-type = ["cdylib"] [dependencies] color-name = "1.1.0" enum-iterator = "2.1.0" +getrandom = { version = "0.3.3", features = ["wasm_js"] } +internment = { version = "0.8.6", features = ["arc"] } linked-hash-map = { version = "0.5.6", features = ["serde", "serde_impl"] } linked_hash_set = { version = "0.1.5", features = ["serde"] } palette = { version = "0.7.6", features = ["serde"] } diff --git a/color-module/build b/color-module/build index adeb2cf..8cf31e1 100755 --- a/color-module/build +++ b/color-module/build @@ -1,2 +1,2 @@ #!/bin/bash -wasm-pack build --release --target web -d ../color_functions +RUSTFLAGS='--cfg getrandom_backend="wasm_js"' wasm-pack build --release --target web -d ../color_functions