Cargo Features

Specta has no features set by default.

[dependencies]
specta = { version = "2.0.0-rc.9", features = ["function", "export", "typescript", "js_doc", "serde", "serde_json", "serde_yaml", "toml", "uuid", "ulid", "chrono", "time", "bigdecimal", "rust_decimal", "indexmap", "ipnetwork", "mac_address", "bit-vec", "bson", "uhlc", "bytesize", "glam", "tokio", "url", "either", "bevy_ecs", "openapiv3"] }

Run node ./.github/features.js to update the docs

function = serde

! Internal Features
Support for exporting the types of Rust functions.

Enables function of specta-macros

Affects ts::export_function_header, specta::function

export

Support for collecting up a global type map

Enables ctor, export of specta-macros

Affects specta::export

typescript = serde

Languages Support for TypeScript language exporting TODO: Probally don't keep serde here for v2???

Affects lang::ts, lang::js_doc

js_doc

Support for JSDoc exporting helpers. Also requires typescript feature to be enabled.

Affects lang::js_doc

serde function? typescript?

Compatability Support for serde

Enables serde, serde of specta-macros

serde_json

Support for serde-json

Enables serde_json

serde_yaml

Support for serde_yaml

Enables serde_yaml

toml

Support for toml

Enables toml ^0.7.6

uuid

External types uuid crate

Enables uuid

ulid

uuid crate

Enables ulid

chrono

chrono crate

Enables chrono

time

time crate

Enables time

bigdecimal

bigdecimal crate

Enables bigdecimal

rust_decimal

rust_decimal crate

Enables rust_decimal

indexmap

indexmap crate

Enables indexmap

TODO: Don't require std

ipnetwork

ipnetwork crate

Enables ipnetwork

mac_address

mac_address crate

Enables mac_address

bit-vec

bit-vec crate

Enables bit-vec

bson

bson crate

Enables bson

uhlc

uhlc crate

Enables uhlc ^0.6.0

bytesize

bytesize crate

Enables bytesize

glam

glam crate

Enables glam ^0.25

tokio

tokio crate

Enables tokio

url

url crate

Enables url

either

either crate

Enables either

bevy_ecs

bevy_ecs crate

Enables bevy_ecs

Features from optional dependencies

openapiv3 implicit feature

Enables openapiv3 ^1.0.2