Search code examples
rustrust-polars

Getting Polars for Rust with Arrow support working on Windows


This appears to be the pertinent documentation polars::prelude::IpcWriter which says "Available on crate feature polars-io only". However, if I add polars = { version = "0.36.2", features = ["polars-io"] } to my Cargo.toml, it still isn't found. I looked through the polars code and it appears that the ipc feature might be required so I add that. Then I get an error that it failed the custom build for zstd-sys v2.0.9+zstd.1.5.5. I think that's a compression library which I shouldn't need for what I'm doing, so I try to figure out how to remove it from the build. But between disabling default features and adding things back in, I haven't found a combination that will build (ie. exclude zstd) and give me the Arrow support I need.

Is there a way to exclude zstd from the build? Or if easier, get the zstd build to succeed.


Solution

  • It appears there is no way to disable the zstd dependency. The IpcWriter is only compiled under the ipc or ipc_streaming features of polars-io, both of which activate polars-arrow/io_ipc_compression, and that activates the zstd dependency.