-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
142 lines (108 loc) · 3.26 KB
/
Cargo.toml
File metadata and controls
142 lines (108 loc) · 3.26 KB
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
[workspace]
members = ["inferadb-derive", "examples"]
[workspace.lints.rust]
unsafe_code = "deny"
missing_docs = "warn"
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
# These are warnings (not deny) because test code legitimately uses unwrap/expect
unwrap_used = "warn"
expect_used = "warn"
# These remain deny - never acceptable even in tests
panic = "deny"
todo = "deny"
unimplemented = "deny"
[package]
name = "inferadb"
version = "0.1.5"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
description = "Official Rust SDK for InferaDB"
repository = "https://github.com/inferadb/rust"
documentation = "https://docs.rs/inferadb"
keywords = ["authorization", "rbac", "rebac", "zanzibar", "permissions"]
categories = ["authentication", "api-bindings"]
readme = "README.md"
[lib]
name = "inferadb"
path = "src/lib.rs"
[dependencies]
# Async runtime
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros"] }
futures = "0.3"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# HTTP
url = "2"
# gRPC (optional)
tonic = { version = "0.14", features = ["transport", "tls-ring", "tls-native-roots"], optional = true }
prost = { version = "0.14", optional = true }
prost-types = { version = "0.14", optional = true }
tonic-prost = { version = "0.14", optional = true }
# REST (optional)
reqwest = { version = "0.13", default-features = false, features = ["json", "stream"], optional = true }
# Cryptography
ed25519-dalek = { version = "2", features = ["pem", "rand_core", "zeroize"] }
zeroize = { version = "1", features = ["derive"] }
# Time
chrono = { version = "0.4", default-features = false, features = ["std", "serde", "clock"] }
# Error handling
thiserror = "2"
# Builder pattern
bon = "=3.8.2"
# Utilities
uuid = { version = "1", features = ["v4"] }
parking_lot = "0.12"
# Tracing (optional)
tracing = { version = "0.1", optional = true }
# Hex encoding
hex = "0.4"
base64 = "0.22"
# URL encoding
urlencoding = "2"
# Bytes
bytes = "1"
# Random
getrandom = "0.2"
fastrand = "2"
# Derive macros (optional)
inferadb-derive = { version = "0.1", path = "inferadb-derive", optional = true }
[build-dependencies]
tonic-prost-build = { version = "0.14", optional = true }
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros", "test-util"] }
tokio-test = "0.4"
proptest = "1"
test-case = "3"
wiremock = "0.6"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Integration test dependencies
anyhow = "1"
jsonwebtoken = { version = "10", features = ["aws_lc_rs"] }
[[test]]
name = "integration"
path = "tests/integration/main.rs"
required-features = ["rest", "integration-tests"]
[features]
default = ["grpc", "rest", "rustls"]
# Transport options
grpc = ["dep:tonic", "dep:prost", "dep:prost-types", "dep:tonic-prost", "dep:tonic-prost-build"]
rest = ["dep:reqwest"]
# TLS options (mutually exclusive)
rustls = ["reqwest?/rustls"]
native-tls = ["reqwest?/native-tls"]
# Optional features
tracing = ["dep:tracing"]
blocking = ["tokio/rt"]
derive = ["dep:inferadb-derive"]
# WASM support
wasm = ["getrandom/js"]
# Testing (not for production use)
integration-tests = []
[lints]
workspace = true
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]