-
Notifications
You must be signed in to change notification settings - Fork 3
/
Cargo.toml
67 lines (57 loc) · 2.25 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
[package]
authors = ["Hung-I Wang <whygowe@gmail.com>"]
categories = ["text-processing", "localization", "value-formatting", "wasm"]
description = "Traditional/Simplified and regional Chinese variants converter based on MediaWiki & OpenCC rulesets and powered by AC automata 轉換简体、繁體及兩岸、新馬中文地區詞,基於MediaWiki和OpenCC之字詞轉換表"
edition = "2021"
license = "GPL-2.0-or-later"
name = "zhconv"
repository = "https://github.com/Gowee/zhconv-rs"
version = "0.3.1"
[lib]
crate-type = ["cdylib", "rlib"]
[features]
# OpenCC rulesets are disabled by default.
# Enabling the feature may improve accuracy at the cost of binary size bloating and performance
# degration.
default = ["compress", "wasm"]
wasm = []
opencc = ["lazy_static"]
compress = ["zstd", "ruzstd"]
[dependencies]
daachorse = "1.0"
itertools = "0.10"
lazy_static = "1.4" # TODO: switch to once_cell
once_cell = "1.8"
regex = "1.5"
ruzstd = { version = "0.4", optional = true }
strum = { version = "0.24", features = ["derive"] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = {version = "0.1"}#, default-features = true, optional = true}
# # `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
# # compared to the default allocator's ~10K. It is slower than the default
# # allocator, however.
# #
# # Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
# wee_alloc = {version = "0.4", default-features = true, optional = true}
[dev-dependencies]
criterion = "0.3"
wasm-bindgen-test = "0.3"
[build-dependencies]
daachorse = "1.0"
hex-literal = "0.4"
itertools = "0.10"
lazy_static = { version = "1.4", optional = true }
once_cell = "1.8"
regex = "1.5"
sha2 = "0.10"
vergen = { version = "8.2", features = ["build", "git", "gitcl"] }
zstd = { version = "0.12", optional = true }
[[bench]]
harness = false
name = "zhconv_benchmark"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html