Skip to content

Commit

Permalink
Fix build, Make the js package a feature that can be enabled for wasm…
Browse files Browse the repository at this point in the history
…, rather than always on (#545)

* Fix build, add js feature

* fix command
  • Loading branch information
alamb authored Jul 14, 2021
1 parent 6698eed commit cdcf013
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ jobs:
export CARGO_HOME="/github/home/.cargo"
export CARGO_TARGET_DIR="/github/home/target"
cd arrow
cargo build --target wasm32-unknown-unknown
cargo build --features=js --target wasm32-unknown-unknown
# test builds with various feature flags
default-build:
Expand Down
3 changes: 2 additions & 1 deletion arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ indexmap = "1.6"
rand = { version = "0.8", default-features = false }
# getrandom is a dependency of rand, not (directly) of arrow
# need to specify `js` feature to build on wasm
getrandom = { version = "0.2", features = ["js"] }
getrandom = { version = "0.2", optional = true }
num = "0.4"
csv_crate = { version = "1.1", optional = true, package="csv" }
regex = "1.3"
Expand All @@ -64,6 +64,7 @@ csv = ["csv_crate"]
ipc = ["flatbuffers"]
simd = ["packed_simd"]
prettyprint = ["prettytable-rs"]
js = ["getrandom/js"]
# The test utils feature enables code used in benchmarks and tests but
# not the core arrow code itself
test_utils = ["rand/std", "rand/std_rng"]
Expand Down
1 change: 1 addition & 0 deletions arrow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The arrow crate provides the following optional features:
- `csv` (default) - support for reading and writing Arrow arrays to/from csv files
- `ipc` (default) - support for the [arrow-flight]((https://crates.io/crates/arrow-flight) IPC and wire format
- `prettyprint` - support for formatting record batches as textual columns
- `js` - support for building arrow for WebAssembly / JavaScript
- `simd` - (_Requires Nightly Rust_) alternate optimized
implementations of some [compute](https://github.com/apache/arrow/tree/master/rust/arrow/src/compute)
kernels using explicit SIMD processor intrinsics.
Expand Down

0 comments on commit cdcf013

Please sign in to comment.