Cargo Features
[dependencies]
ts-rs = { version = "10.0.0", default-features = false, features = ["chrono-impl", "bigdecimal-impl", "uuid-impl", "bson-uuid-impl", "bytes-impl", "url-impl", "serde-compat", "format", "indexmap-impl", "ordered-float-impl", "heapless-impl", "semver-impl", "smol_str-impl", "serde-json-impl", "no-serde-warnings", "import-esm"] }
- default = serde-compat
-
The
serde-compat
feature is set by default wheneverts-rs
is added without
somewhere in the dependency tree.default-features = false - chrono-impl = chrono
- bigdecimal-impl = bigdecimal
- uuid-impl = uuid
- bson-uuid-impl = bson
- bytes-impl = bytes
- url-impl = url
- serde-compat default
-
Enables serde-compat of ts-rs-macros
- format = dprint-plugin-typescript
- indexmap-impl = indexmap
- ordered-float-impl = ordered-float
- heapless-impl = heapless
- semver-impl = semver
- smol_str-impl = smol_str
- serde-json-impl = serde_json
- no-serde-warnings
-
Enables no-serde-warnings of ts-rs-macros
- import-esm
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.
- heapless heapless-impl?
- dprint-plugin-typescript format?
-
Enables dprint-plugin-typescript ^0.90
- chrono chrono-impl?
- bigdecimal bigdecimal-impl?
- uuid uuid-impl?
- bson bson-uuid-impl?
- bytes bytes-impl?
- url url-impl?
- semver semver-impl?
- smol_str smol_str-impl?
- indexmap indexmap-impl?
- ordered-float ordered-float-impl?
- serde_json serde-json-impl?