forked from specta-rs/specta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
142 lines (131 loc) · 5.94 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
[package]
name = "specta"
description = "Easily export your Rust types to other languages"
version = "2.0.0-rc.7"
authors = ["Oscar Beaumont <oscar@otbeaumont.me>"]
edition = "2021"
license = "MIT"
include = ["/src", "/examples", "/LICENCE", "/README.md"]
repository = "https://github.com/oscartbeaumont/specta"
documentation = "https://docs.rs/specta/latest/specta"
keywords = ["async", "specta", "rspc", "typescript", "typesafe"]
categories = ["web-programming", "asynchronous"]
autotests = false
# /bin/sh RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
[package.metadata."docs.rs"]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[[test]]
name = "integration_tests"
path = "tests/lib.rs"
harness = true
[[example]]
name = "export"
required-features = ["export", "typescript"]
# Run `node ./.github/features.js` to update the docs
[features]
default = []
##! Internal Features
## Support for exporting the types of Rust functions.
functions = ["serde", "specta-macros/functions"]
## Support for collecting up a global type map
export = ["dep:ctor", "specta-macros/export"]
#! Languages
## Support for [TypeScript](https://www.typescriptlang.org) language exporting
typescript = ["serde"] # TODO: Probally don't keep `serde` here for v2???
## Support for [JSDoc](https://jsdoc.app) exporting helpers.
## Also requires `typescript` feature to be enabled.
js_doc = []
# ## Support for [Rust](https://www.rust-lang.org) language exporting
# rust = []
# ## Support for [Swift](https://www.swift.org/) language exporting
# swift = []
# ## Support for [Kotlin](https://kotlinlang.org/) language exporting
# kotlin = []
# ## Support for [Go Lang](https://go.dev/) language exporting
# go = []
# ## Support for [OpenAPI](https://www.openapis.org) language exporting
# openapi = ["dep:openapiv3"]
#! Compatability
## Support for [serde](https://serde.rs)
serde = ["dep:serde", "specta-macros/serde"]
## Support for [serde-json](https://github.com/serde-rs/json)
serde_json = ["dep:serde_json"]
## Support for [serde_yaml](https://github.com/dtolnay/serde-yaml)
serde_yaml = ["dep:serde_yaml"]
## Support for [toml](https://github.com/toml-rs/toml)
toml = ["dep:toml"]
## Support for [Tauri](https://tauri.app). This is required when using [`specta::function`](macro@crate::specta) with Tauri Commands.
tauri = ["dep:tauri"]
#! External types
## [uuid](https://docs.rs/uuid) crate
uuid = ["dep:uuid"]
## [uuid](https://docs.rs/ulid) crate
ulid = ["dep:ulid"]
## [chrono](https://docs.rs/chrono) crate
chrono = ["dep:chrono"]
## [time](https://docs.rs/time) crate
time = ["dep:time"]
## [bigdecimal](https://docs.rs/bigdecimal) crate
bigdecimal = ["dep:bigdecimal"]
## [rust_decimal](https://docs.rs/rust_decimal) crate
rust_decimal = ["dep:rust_decimal"]
## [indexmap](https://docs.rs/indexmap) crate
indexmap = ["dep:indexmap"]
## [ipnetwork](https://docs.rs/ipnetwork) crate
ipnetwork = ["dep:ipnetwork"]
## [mac_address](https://docs.rs/mac_address) crate
mac_address = ["dep:mac_address"]
## [bit-vec](https://docs.rs/bit-vec) crate
bit-vec = ["dep:bit-vec"]
## [bson](https://docs.rs/bson) crate
bson = ["dep:bson"]
## [uhlc](https://docs.rs/uhlc) crate
uhlc = ["dep:uhlc"]
## [bytesize](https://docs.rs/bytesize) crate
bytesize = ["dep:bytesize"]
## [glam](https://docs.rs/glam) crate
glam = ["dep:glam"]
## [tokio](https://docs.rs/tokio) crate
tokio = ["dep:tokio"]
## [url](https://docs.rs/url) crate
url = ["dep:url"]
## [either](https://docs.rs/either) crate
either = ["dep:either"]
# [bevy_ecs](https://docs.rs/bevy_ecs) crate
bevy_ecs = ["dep:bevy_ecs"]
[dependencies]
specta-macros = { version = "=2.0.0-rc.7", path = "./macros" }
serde = { version = "1.0.183", optional = true, default-features = false, features = ["derive"] }
serde_json = { version = "1.0.104", optional = true, default-features = false, features = ["std"] }
serde_yaml = { version = "0.9.25", optional = true, default-features = false, features = [] }
toml = { version = "0.7.6", optional = true, default-features = false }
ulid = { version = "1.1.0", optional = true, default-features = false, features = [] }
uuid = { version = "1.4.1", optional = true, default-features = false, features = [] }
chrono = { version = "0.4.26", optional = true, default-features = false, features = ["clock"] }
time = { version = "0.3.25", optional = true, default-features = false, features = [] }
bigdecimal = { version = "0.4.1", optional = true, default-features = false, features = [] }
rust_decimal = { version = "1.31.0", optional = true, default-features = false, features = [] }
indexmap = { version = "2.0.0", optional = true, default-features = false, features = ["std"] } # TODO: Don't require `std`
ipnetwork = { version = "0.20.0", optional = true, default-features = false, features = [] }
mac_address = { version = "1.1.5", optional = true, default-features = false, features = [] }
bit-vec = { version = "0.6.3", optional = true, default-features = false, features = [] }
bson = { version = "2.6.1", optional = true, default-features = false, features = [] }
openapiv3 = { version = "1.0.2", optional = true, default-features = false, features = [] }
uhlc = { version = "0.6.0", optional = true, default-features = false, features = [] }
tauri = { version = "1.4.1", optional = true, default-features = false, features = [] }
bytesize = { version = "1.2.0", optional = true, default-features = false, features = [] }
glam = { version = "0.25", optional = true, default-features = false, features = ["std"] }
tokio = { version = "1.30", optional = true, default-features = false, features = ["sync"] }
url = { version = "2.4.0", optional = true, default-features = false }
either = { version = "1.9.0", optional = true, default-features = false }
bevy_ecs = { version = "0.13.0", optional = true, default-features = false }
thiserror = "1.0.44"
paste = "1.0.14"
ctor = { version = "0.2.4", optional = true }
once_cell = "1.18.0"
[dev-dependencies]
doc-comment = "0.3.3"
serde = { version = "1.0.183", features = ["derive"] }
trybuild = "1.0.82"
wasm-bindgen = "0.2.89"