From bfe8a3c85c4801d008fe0ff433e424554240fb4b Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Fri, 3 May 2024 14:00:53 +0100 Subject: [PATCH] Support WASM (#297) Except for FastLanez --- Cargo.lock | 1 + Cargo.toml | 1 + deps/fastlanez | 2 +- vortex-array/Cargo.toml | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 38df597b46..65c4ce8f9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4918,6 +4918,7 @@ dependencies = [ "flatbuffers", "flatc", "flexbuffers", + "getrandom", "humansize", "itertools 0.12.1", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index b4246ee466..350e3a2bba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,6 +60,7 @@ flatbuffers = "23.5.26" flatc = "0.2.2" flexbuffers = "2.0.0" fs_extra = "1.3.0" +getrandom = "0.2.14" half = { version = "^2", features = ["std", "num-traits"] } hashbrown = "0.14.3" humansize = "2.1.3" diff --git a/deps/fastlanez b/deps/fastlanez index 1876907db2..84a5389944 160000 --- a/deps/fastlanez +++ b/deps/fastlanez @@ -1 +1 @@ -Subproject commit 1876907db2e9b1e26e3a445cdac474e0300847d0 +Subproject commit 84a5389944210179ed203f7475700777056a63a9 diff --git a/vortex-array/Cargo.toml b/vortex-array/Cargo.toml index 8b561d827a..c509114d22 100644 --- a/vortex-array/Cargo.toml +++ b/vortex-array/Cargo.toml @@ -39,6 +39,10 @@ vortex-flatbuffers = { path = "../vortex-flatbuffers" } vortex-scalar = { path = "../vortex-scalar", features = ["serde"] } serde = { workspace = true, features = ["derive"] } +[target.'cfg(target_arch = "wasm32")'.dependencies] +# Enable the JS feature of getrandom (via rand) to supprt wasm32 target +getrandom = { workspace = true, features = ["js"] } + [build-dependencies] flatc = { workspace = true } walkdir = { workspace = true }