-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathCargo.toml
283 lines (246 loc) · 8.92 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
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
[workspace.package]
description = "An integrated language service for Typst."
authors = ["Myriad-Dreamin <[email protected]>", "Nathan Varner"]
version = "0.12.18"
edition = "2021"
readme = "README.md"
license = "Apache-2.0"
homepage = "https://github.com/Myriad-Dreamin/tinymist"
repository = "https://github.com/Myriad-Dreamin/tinymist"
# also change in ci.yml
rust-version = "1.82"
[workspace]
resolver = "2"
members = ["crates/*", "tests"]
[workspace.dependencies]
# Basic Infra
anyhow = "1"
if_chain = "1"
itertools = "0.13"
once_cell = "1"
paste = "1.0"
cfg-if = "1.0"
strum = { version = "0.26.2", features = ["derive"] }
quote = "1"
syn = "2"
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
# Asynchoronous and Multi-threading
async-trait = "0.1.77"
futures = "0.3"
rayon = "1.10.0"
tokio = { version = "1.42.0", features = [
"macros",
"rt-multi-thread",
"io-std",
] }
tokio-util = { version = "0.7.13", features = ["compat"] }
# System
open = { version = "5.1.3" }
parking_lot = "0.12.1"
walkdir = "2"
chrono = "0.4"
dirs = "5"
fontdb = "0.21"
notify = "6"
path-clean = "1.0.1"
windows-sys = "0.59"
tempfile = "3.10.1"
same-file = "1.0.6"
libc = "0.2.155"
core-foundation = { version = "0.10.0", features = ["mac_os_10_7_support"] }
# Web
js-sys = "^0.3"
wasm-bindgen = "^0.2"
wasm-bindgen-futures = "^0.4"
wasm-bindgen-test = "0.3.45"
web-sys = "^0.3"
web-time = { version = "1.1.0" }
console_error_panic_hook = { version = "0.1.7" }
# Networking
hyper = { version = "1", features = ["full"] }
hyper-util = { version = "0.1.7", features = ["tokio"] }
hyper-tungstenite = "0.15.0"
reqwest = { version = "^0.12", default-features = false, features = [
"rustls-tls",
"blocking",
"multipart",
] }
# Algorithms
base64 = "0.22"
regex = "1.10.5"
# Cryptography and data processing
rustc-hash = { version = "2", features = ["std"] }
siphasher = "1"
fxhash = "0.2.1"
sha2 = "0.10.6"
nohash-hasher = "0.2.0"
# Data Structures
bitvec = "1"
comemo = "0.4"
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
dashmap = { version = "=5.5.3", features = ["raw-api"] }
ecow = "0.2.3"
ena = "0.14.2"
hashbrown = { version = "0.14", features = [
"inline-more",
], default-features = false }
indexmap = "2.7.0"
rpds = "1"
# Data/Text Format and Processing
hex = "0.4.3"
flate2 = "1"
tar = "0.4"
biblatex = "0.10"
pathdiff = "0.2"
percent-encoding = "2"
rust_iso639 = "0.0.3"
rust_iso3166 = "0.1.4"
rkyv = "0.7.42"
semver = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_repr = "0.1"
serde_with = { version = "3.6", features = ["base64"] }
serde_yaml = "0.9"
serde-wasm-bindgen = "^0.6"
toml = { version = "0.8", default-features = false, features = [
"parse",
"display",
] }
ttf-parser = "0.24.1"
unicode-script = "0.5"
unscanny = "0.1"
yaml-rust2 = "0.9"
# Logging
codespan-reporting = "0.11"
env_logger = "0.11.3"
log = "0.4"
# Typst
reflexo = { version = "=0.5.4", default-features = false, features = [
"flat-vector",
] }
reflexo-typst = { version = "=0.5.4", default-features = false }
reflexo-vec2svg = { version = "=0.5.4" }
reflexo-typst-shim = { version = "=0.5.4", features = ["nightly"] }
typst = "0.12.0"
typst-timing = "0.12.0"
typst-svg = "0.12.0"
typst-render = "0.12.0"
typst-pdf = "0.12.0"
typst-syntax = "0.12.0"
typst-assets = "0.12.0"
typstfmt = { git = "https://github.com/Myriad-Dreamin/typstfmt", tag = "v0.12.1" }
typst-ansi-hl = "0.3.0"
typstyle-core = { version = "=0.12.13", default-features = false }
typlite = { path = "./crates/typlite" }
typst-shim = { path = "./crates/typst-shim" }
# LSP
crossbeam-channel = "0.5.12"
lsp-server = "0.7.6"
lsp-types = { version = "=0.95.0", features = ["proposed"] }
sync-lsp = { path = "./crates/sync-lsp", features = ["clap"] }
# CLI
clap = { version = "4.5", features = ["derive", "env", "unicode", "wrap_help"] }
clap_builder = { version = "4.5", features = ["string"] }
clap_complete = "4.5"
clap_complete_fig = "4.5"
clap_complete_nushell = "4.5.3"
clap_mangen = { version = "0.2.22" }
vergen = { version = "8.3.1", features = [
"build",
"cargo",
"git",
"gitcl",
"rustc",
] }
# Testing
dhat = "0.3.3"
divan = "0.1.14"
insta = { version = "1.39", features = ["glob"] }
# Our Own Crates
typst-preview = { path = "./crates/typst-preview" }
tinymist-assets = { version = "0.12.18" }
tinymist = { path = "./crates/tinymist/" }
tinymist-std = { path = "./crates/tinymist-std/", default-features = false }
tinymist-vfs = { path = "./crates/tinymist-vfs/", default-features = false }
tinymist-core = { path = "./crates/tinymist-core/", default-features = false }
tinymist-world = { path = "./crates/tinymist-world/", default-features = false }
tinymist-project = { path = "./crates/tinymist-project/" }
tinymist-derive = { path = "./crates/tinymist-derive/" }
tinymist-analysis = { path = "./crates/tinymist-analysis/" }
tinymist-query = { path = "./crates/tinymist-query/" }
tinymist-render = { path = "./crates/tinymist-render/" }
[profile.dev.package.insta]
opt-level = 3
[profile.dev.package.similar]
opt-level = 3
[profile.release]
# lto = true # Enable link-time optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations
panic = "abort" # Abort on panic
[profile.gh-release]
inherits = "release"
debug = true
# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
[workspace.lints.rustdoc]
broken_intra_doc_links = "warn"
[workspace.lints.rust]
missing_docs = "warn"
# missing_crate_level_docs = "warn"
[workspace.lints.clippy]
uninlined_format_args = "warn"
# missing_errors_doc = "warn"
# missing_panics_doc = "warn"
# missing_docs_in_private_items = "warn"
missing_safety_doc = "warn"
undocumented_unsafe_blocks = "warn"
[workspace.metadata.typos.default]
locale = "en-us"
[workspace.metadata.typos.default.extend-words]
labelled = "labelled"
onces = "onces"
withs = "withs"
[workspace.metadata.typos.files]
ignore-hidden = false
extend-exclude = ["/.git", "fixtures"]
[patch.crates-io]
# This patch is used to bundle a locally built frontend (HTML) of `typst-preview`.
# The shortcoming is that you cannot install tinymist from git source then, i.e. `cargo install --git ..`, with this patch.
# However, it is not suggested to install it in that way. The suggested ways are:
# - Installation: https://github.com/Myriad-Dreamin/tinymist?tab=readme-ov-file#installation
# - Installing pre-built artifacts from GitHub : https://github.com/Myriad-Dreamin/tinymist?tab=readme-ov-file#installing-regularnightly-prebuilds-from-github
# tinymist-assets = { path = "./crates/tinymist-assets/" }
# These patches use a different version of `typst`, which only exports some private functions and information for code analysis.
#
# A regular build MUST use `tag` or `rev` to specify the version of the patched crate to ensure stability.
typst = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.12.0" }
typst-timing = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.12.0" }
typst-svg = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.12.0" }
typst-render = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.12.0" }
typst-pdf = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.12.0" }
typst-syntax = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.12.0" }
# These patches use local `typst` for development.
# typst = { path = "../typst/crates/typst" }
# typst-timing = { path = "../typst/crates/typst-timing" }
# typst-svg = { path = "../typst/crates/typst-svg" }
# typst-pdf = { path = "../typst/crates/typst-pdf" }
# typst-render = { path = "../typst/crates/typst-render" }
# typst-syntax = { path = "../typst/crates/typst-syntax" }
# These patches use a different version of `reflexo`.
#
# A regular build MUST use `tag` or `rev` to specify the version of the patched crate to ensure stability.
# reflexo = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "1b6e29c650ad6d3095e5ea18d93a2428c1ae77b9" }
# reflexo-typst = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "1b6e29c650ad6d3095e5ea18d93a2428c1ae77b9" }
# reflexo-typst2vec = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "1b6e29c650ad6d3095e5ea18d93a2428c1ae77b9" }
# reflexo-vec2svg = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "1b6e29c650ad6d3095e5ea18d93a2428c1ae77b9" }
# reflexo-typst-shim = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "1b6e29c650ad6d3095e5ea18d93a2428c1ae77b9" }
# These patches use local `reflexo` for development.
# reflexo = { path = "../typst.ts/crates/reflexo/" }
# reflexo-typst = { path = "../typst.ts/crates/reflexo-typst/" }
# reflexo-typst2vec = { path = "../typst.ts/crates/conversion/typst2vec/" }
# reflexo-vec2svg = { path = "../typst.ts/crates/conversion/vec2svg/" }
# reflexo-typst-shim = { path = "../typst.ts/crates/reflexo-typst-shim/" }
# typstyle = { path = "../typstyle" }