-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
180 lines (149 loc) 路 5.46 KB
/
Copy pathCargo.toml
File metadata and controls
180 lines (149 loc) 路 5.46 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[workspace]
members = ['crates/*', 'apps/engine']
resolver = '3'
[workspace.package]
version = '0.0.1'
description = '馃И Acidic is a modeling tool that can be used to describe and generate code for API end points, database tables, type definitions, client components, and so much more!'
repository = 'https://github.com/storm-software/acidic'
edition = '2024'
authors = ["storm-software", "pat-sullivan"]
license = 'Apache-2.0'
documentation = 'https://acidic.io/docs'
homepage = 'https://acidic.io'
categories = ['config', 'development-tools']
keywords = ['acidic', 'storm', 'storm-software', 'acidic-lang', 'acidic-engine']
readme = "./README.md"
[workspace.lints.rust]
missing-debug-implementations = "warn"
missing-docs = "warn"
unreachable-pub = "warn"
unused-must-use = "deny"
rust-2018-idioms = "deny"
unnameable-types = "warn"
[workspace.lints.rustdoc]
all = "warn"
[workspace.lints.clippy]
# Guidelines
# - We should only disable rules globally if they are either false positives, chaotic, or does not make sense.
# - Group are enabled with priority -1, so we could easily override some specific rules.
# - https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-lints-section
# --- restriction https://doc.rust-lang.org/clippy/usage.html#clippyrestriction
allow_attributes = "deny"
dbg_macro = "deny"
print_stdout = "deny"
# I like the explicitness of this rule as it removes confusion around `clone`.
# This increases readability, avoids `clone` mindlessly and heap allocating on accident.
clone_on_ref_ptr = "deny"
empty_drop = "deny"
exit = "deny"
filetype_is_file = "deny"
get_unwrap = "deny"
rc_buffer = "deny"
rc_mutex = "deny"
rest_pat_in_fully_bound_structs = "deny"
unnecessary_safety_comment = "deny"
# --- pedantic #https://doc.rust-lang.org/clippy/usage.html#clippypedantic
# To write the best rust code, pedantic group is enabled by default.
pedantic = { level = "deny", priority = -1 }
case_sensitive_file_extension_comparisons = "allow"
# Wizards, naming is too hard.
module_inception = "allow"
module_name_repetitions = "allow"
similar_names = "allow"
# Forwarding `Result` is a common pattern, this rule is too pedantic.
missing_errors_doc = "allow"
# #[must_use] is creating too much noise for this codebase, it does not add much value except nagging
# the programmer to add a #[must_use] after clippy has been run.
# Having #[must_use] everywhere also hinders readability.
must_use_candidate = "allow"
doc_markdown = "allow"
missing_const_for_fn = "allow"
needless_for_each = "allow"
new_without_default = "allow"
missing_panics_doc = "allow"
# Order doesn't really matter https://rust-lang.github.io/rust-clippy/master/index.html#/inconsistent_struct_constructor
inconsistent_struct_constructor = "allow"
# Single match is equally readable as if/else. https://rust-lang.github.io/rust-clippy/master/index.html#/single_match
single_match = "allow"
single_match_else = "allow"
# Though the following are nursery rules, they鈥檙e still useful.
debug_assert_with_mut_call = "warn"
iter_on_single_items = "warn"
needless_pass_by_ref_mut = "warn"
redundant_clone = "warn"
redundant_pub_crate = "warn"
significant_drop_in_scrutinee = "warn"
unused_peekable = "warn"
# Rewriting `unwrap_or` to `map_or` requires to annotate type explicitly which is cumbersome
map_unwrap_or = "allow"
collapsible_if = "allow"
[workspace.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[workspace.dependencies]
# Acidic Crates
acidic-binding = { path = "./crates/acidic-binding" }
acidic-config = { path = "./crates/acidic-config" }
acidic-diagnostics = { path = "./crates/acidic-diagnostics" }
acidic-parser = { path = "./crates/acidic-parser" }
acidic-rpc = { path = "./crates/acidic-rpc" }
acidic-sdl = { path = "./crates/acidic-sdl" }
acidic-server = { path = "./crates/acidic-server" }
acidic-template-engine = { path = "./crates/acidic-template-engine" }
# Storm Software Crates
storm-config = "0.2.8"
storm-workspace = "0.19.59"
# Other Dependencies
indoc = "2.0.4"
itertools = "0.12.1"
indexmap = { version = "2.2.6", features = ["serde"] }
thiserror = "2.0.17"
tempfile = "3.10.1"
directories = "5.0.1"
lazy_static = "1.4.0"
handlebars = "6.3.2"
colored = "2.1.0"
cacache = "13.0.0"
backtrace = "0.3.71"
protoc-bin-vendored = "3.0.0"
napi = { version = '2.10.2', default-features = false, features = ['napi4'] }
napi-build = '2.0.1'
napi-derive = '2.9.3'
pest = "2.7.8"
pest_derive = "2.7.8"
prost = "0.12.3"
prost-types = "0.12.3"
serde = { version = "1.0.197", features = ["derive"] }
serde_derive = "1.0.197"
serde_json = "1.0.115"
strum = "0.27.2"
strum_macros = "0.27.2"
tonic = "0.11.0"
tonic-build = { version = "0.11.0", default-features = false, features = [
"prost",
"cleanup-markdown",
] }
tonic-reflection = "0.6.0"
[profile.release]
# configuration adapted from oxc
# https://github.com/Boshen/oxc/blob/ea85ee9f2d64dd284c5b7410f491d81fb879abae/Cargo.toml#L89-L97
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"
debug = false
panic = "abort" # Let it crash and force ourselves to write safe Rust.
[profile.dev.build-override]
strip = 'debuginfo'
incremental = false
[profile.release-dhat]
inherits = 'release'
debug = 1
# Make insta run faster by compiling with release mode optimizations
# https://docs.rs/insta/latest/insta/#optional-faster-runs
[profile.dev.package.insta]
opt-level = 3
# Make insta diffing libary faster by compiling with release mode optimizations
# https://docs.rs/insta/latest/insta/#optional-faster-runs
[profile.dev.package.similar]
opt-level = 3