Skip to content

Commit

Permalink
feat: disable opencc by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowee committed Mar 22, 2024
1 parent bd8d3a0 commit 9f1761b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ version = "0.3.1"
crate-type = ["cdylib", "rlib"]

[features]
# OpenCC rulesets are activated by default.
# Disabling the feature would reduce binary size significantly and boost performance further at
# the cost of accuracy.
default = ["opencc", "compress"]
# OpenCC rulesets are disabled by default.
# Enable the feature may improve accuracy at the cost of binary size bloating and performance
# degration.
default = ["compress"]
opencc = ["lazy_static"]
compress = ["zstd", "ruzstd"]

Expand Down
2 changes: 1 addition & 1 deletion pyo3/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin>=0.14,<0.15"]
requires = ["maturin>=1.5,<1.6"]
build-backend = "maturin"

[project]
Expand Down
1 change: 1 addition & 0 deletions web/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = function override(config, env) {
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, "../"),
withTypeScript: true,
extraArgs: "-- --features opencc",
// NOTE: it is 'index' by default, different from the default (package name) of wasm-pack
outName: 'zhconv'
}));
Expand Down

0 comments on commit 9f1761b

Please sign in to comment.