Cargo Features

rust_xlsxwriter has no features set by default.

[dependencies]
rust_xlsxwriter = { version = "0.80.0", features = ["zlib", "chrono", "constant_memory", "polars", "serde", "wasm", "ryu", "test-resave"] }
default

default: Includes all the standard functionality.

zlib

zlib: Adds a dependency on zlib and a C compiler. This includes the same features as default but is 1.5x faster for large files.

Enables deflate-zlib of zip

Default/non-optional dependencies.

chrono

chrono: Add support for Chrono dates/times in addition to the native ExcelDateTime types.

Enables chrono

constant_memory

Enable "constant memory" when writing worksheet data. This keeps memory usage to a minimum when writing large files.

Enables tempfile

polars

polars: Add support for mapping between PolarsError and rust_xlsxwriter::XlsxError to make code that handles both types of error easier to write.

Enables polars ^0.44

serde

serde: Adds supports for Serde serialization.

Enables rust_xlsxwriter_derive and serde

Affects rust_xlsxwriter::serializer, utility::serialize_chrono_naive_to_excel, utility::serialize_chrono_option_naive_to_excel

wasm = js-sys, wasm-bindgen

wasm: Enable wasm/Javascript compilation.

ryu

ryu: Adds a dependency on ryu. This speeds up writing numeric worksheet cells for large data files. It gives a performance boost above 300,000 numeric cells and can be up to 30% faster than the default number formatting for 5,000,000 numeric cells.

Enables ryu

Optional dependencies.

test-resave

test-resave: Developer only testing feature.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

js-sys wasm?
wasm-bindgen wasm?