roee88 commented on a change in pull request #674:
URL: https://github.com/apache/arrow-rs/pull/674#discussion_r684726091
##########
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:
### side note
When compiling to `wasm32-wasi` you can also enable the `prettyprint`
feature if you patch `prettytable-rs` in your `Cargo.toml`:
```toml
[patch.crates-io]
prettytable-rs = { git = "https://github.com/phsym/prettytable-rs", branch =
"master"}
```
This is mentioned in polars but I'm not sure if this fits the arrow README
so I didn't include it. The arrow2 project recently changed to comfy-table
because prettytable-rs is not maintained (see
https://github.com/jorgecarleitao/arrow2/pull/251). I don't think that
comfy-table compiles to wasm32-wasi but that's minor for now.
--
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]