Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
161 lines (138 loc) · 4.77 KB
/
Copy pathCargo.toml
File metadata and controls
161 lines (138 loc) · 4.77 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[workspace]
members = ["."]
exclude = ["fuzz", "tests/golden/gen/v7", "tests/golden/gen/v8"]
resolver = "2"
[package]
name = "minigraf"
version = "2.0.5"
edition = "2024"
rust-version = "1.89"
description = "Zero-config, single-file, embedded graph database with bi-temporal Datalog queries"
license = "MIT OR Apache-2.0"
authors = ["Aditya Mukhopadhyay"]
repository = "https://github.com/project-minigraf/minigraf"
keywords = ["graph", "datalog", "bitemporal", "embedded", "database"]
categories = ["database-implementations", "embedded"]
readme = "README.md"
documentation = "https://docs.rs/minigraf"
[lib]
crate-type = ["cdylib", "rlib"]
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
[dependencies]
serde = { version = "1.0", features = ["derive"] }
postcard = { version = "1.0", features = ["alloc"] }
crc32fast = "1.4"
anyhow = "1.0"
chrono = { version = "0.4", features = ["serde", "std"], default-features = false }
uuid = { version = "1.0", features = ["v5", "serde"] }
regex-lite = "0.1.9"
serde_json = { version = "1.0", optional = true }
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies]
wasm-bindgen = { version = "0.2", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
js-sys = { version = "0.3", optional = true }
web-sys = { version = "0.3", optional = true, features = [
"DomStringList",
"Event",
"IdbDatabase",
"IdbFactory",
"IdbIndex",
"IdbObjectStore",
"IdbOpenDbRequest",
"IdbRequest",
"IdbTransaction",
"IdbTransactionMode",
"Window",
] }
[dev-dependencies]
serde_json = "1.0"
pest = "2"
pest_derive = "2"
pest_meta = "2"
[target.'cfg(all(minigraf_shuttle, not(target_arch = "wasm32")))'.dev-dependencies]
# #760 bounded prototype; used only with --cfg minigraf_shuttle in unit tests.
shuttle = "=0.9.8"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tempfile = "3"
criterion = { version = "0.8", features = ["html_reports"] }
wide = "1.4"
proptest = "1"
uuid = { version = "1.0", features = ["v4", "v5"] }
[target.'cfg(all(target_arch = "wasm32", target_os = "wasi"))'.dev-dependencies]
uuid = { version = "1.0", features = ["v4"] }
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dev-dependencies]
wasm-bindgen-test = "0.3"
uuid = { version = "1.0", features = ["v4", "js"] }
[[bench]]
name = "minigraf_bench"
harness = false
# `cargo test` runs the envelope harness's unit tests (the -irregular fixture, #551).
[[example]]
name = "perf_envelope"
test = true
[features]
default = []
# Deprecated, does nothing since v3.0.0: every build reorders query clauses
# (#594, #596). Kept so that builds naming it still resolve.
wasm = []
# Test-only switches for integration tests: clause reordering, `not`/`or`
# body forms, transaction chunk size and its high-water mark (#596, #546,
# #550; `minigraf::__reorder` and the rest). Tests only.
test-hooks = []
browser = [
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
"dep:web-sys",
"dep:js-sys",
"dep:serde_json",
]
[profile.release]
panic = "abort"
lto = true
codegen-units = 1
strip = "symbols"
opt-level = "z"
# uniffi-bindgen reads UNIFFI_META symbols from .symtab (not .dynsym).
# examples/perf_envelope.rs (#394): opt-level 3, as an application's release
# build compiles the library; `release` is tuned for the REPL binary's size.
[profile.envelope]
inherits = "release"
opt-level = 3
strip = "none"
[profile.bench]
strip = "none"
debug = true
lto = true
codegen-units = 1
panic = "unwind"
# The profile that 'dist' will build with. It keeps release's full LTO, so the
# shipped binaries are the ones binary-size.yml measures (#796).
[profile.dist]
inherits = "release"
[lints]
workspace = true
[workspace.lints.rust]
# Kani proof harnesses (#627): `cargo kani` sets cfg(kani).
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)', 'cfg(minigraf_shuttle)'] }
[workspace.lints.clippy]
# Panic prevention — use Result/? or debug_assert! instead
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unreachable = "allow" # legitimate in exhaustive match arms; too noisy as warn
# Numeric safety — critical for page offsets, checksums, byte sizes
cast_possible_truncation = "deny"
cast_possible_wrap = "deny"
cast_sign_loss = "deny"
arithmetic_side_effects = "allow" # too noisy for parser/evaluator index arithmetic
# Bounds safety
indexing_slicing = "deny"
# API documentation
missing_errors_doc = "allow" # too noisy; revisit when writing public API docs