alamb commented on a change in pull request #674:
URL: https://github.com/apache/arrow-rs/pull/674#discussion_r684753864
##########
File path: arrow/Cargo.toml
##########
@@ -64,16 +61,18 @@ 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"]
+# not the core arrow code itself. Be aware that `rand` must be kept as
+# an optional dependency for supporting compile to wasm32-unknown-unknown
+# target without assuming an environment containing JavaScript.
+test_utils = ["rand"]
Review comment:
👍
##########
File path: arrow/README.md
##########
@@ -59,11 +59,13 @@ println!("{:?}", array.value(1));
## Building for WASM
-In order to compile Arrow for Web Assembly (the `wasm32-unknown-unknown` WASM
target), you will likely need to turn off this crate's default features and use
the `js` feature.
+Arrow can compile to WebAssembly using the `wasm32-unknown-unknown` and
`wasm32-wasi` targets.
+
+In order to compile Arrow for `wasm32-unknown-unknown` you will need to
exclude test dependencies (the `test_utils` feature). For example, use this
snippet in your `Cargo.toml`:
```toml
[dependencies]
-arrow = { version = "5.0", default-features = false, features = ["js"] }
+arrow = { version = "5.0", default-features = false, features = ["csv", "ipc",
"simd"] }
```
Review comment:
See also https://github.com/apache/arrow-rs/pull/656 from @PsiACE -- I
am not sure if the same applies to comfy-table
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]