From c6cf7fabc0500931dc55526d74830d1d52314f02 Mon Sep 17 00:00:00 2001 From: Masato TOYOSHIMA Date: Sat, 11 Jan 2025 14:39:24 +0900 Subject: [PATCH] dict-to-mozc v0.6.13 added mimalloc-rust unstable features - unstable-mimalloc - unstable for arm build - patch - cc 1.2.8 - patch - kanaria 0.2.1 --- .github/setup.yml | 2 ++ .github/workflows/release.yml | 2 ++ Cargo.lock | 9 ++++----- Cargo.toml | 21 +++++++++++++-------- dist-workspace.toml | 1 + 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/setup.yml b/.github/setup.yml index 216f76f..3e34fee 100644 --- a/.github/setup.yml +++ b/.github/setup.yml @@ -38,6 +38,8 @@ shell: bash run: | sed -i -e 's|channel.*=.*|channel = "nightly"|' rust-toolchain.toml + sed -i -e 's|features =.*$|features = [ "use-mimalloc-rs", "unstable" ]|' dist-workspace.toml + #rust-toolchain.tomlに記載しているので、cargoコマンドで自動で追加インストールされるため不要 #rustup update nightly #rustup component add rust-src --toolchain nightly diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47f3c5c..dda3091 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -163,6 +163,8 @@ jobs: - name: "Install rust and rust-src" run: | sed -i -e 's|channel.*=.*|channel = "nightly"|' rust-toolchain.toml + sed -i -e 's|features =.*$|features = [ "use-mimalloc-rs", "unstable" ]|' dist-workspace.toml + #rust-toolchain.tomlに記載しているので、cargoコマンドで自動で追加インストールされるため不要 #rustup update nightly #rustup component add rust-src --toolchain nightly diff --git a/Cargo.lock b/Cargo.lock index f228832..ddc6f9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,8 +55,7 @@ checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" [[package]] name = "cc" version = "1.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0cf6e91fde44c773c6ee7ec6bba798504641a8bc2eb7e37a04ffbf4dfaa55a" +source = "git+https://github.com/rust-lang/cc-rs.git?rev=2e74353eb1d021ed272bc606242b2c700de9cbaa#2e74353eb1d021ed272bc606242b2c700de9cbaa" dependencies = [ "shlex", ] @@ -99,7 +98,7 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "dict-to-mozc" -version = "0.6.13-pre" +version = "0.6.13" dependencies = [ "argh", "csv", @@ -156,7 +155,7 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "kanaria" version = "0.2.1" -source = "git+https://github.com/phoepsilonix/kanaria.git?rev=18ca812a1fe8c7f30a753aecc2681db1f18031e8#18ca812a1fe8c7f30a753aecc2681db1f18031e8" +source = "git+https://github.com/samunohito/kanaria.git?rev=18ca812a1fe8c7f30a753aecc2681db1f18031e8#18ca812a1fe8c7f30a753aecc2681db1f18031e8" dependencies = [ "bitflags", ] @@ -186,7 +185,7 @@ dependencies = [ [[package]] name = "lib-dict-to-mozc" -version = "0.6.13-pre" +version = "0.6.13" dependencies = [ "csv", "hashbrown", diff --git a/Cargo.toml b/Cargo.toml index 64a7bb9..0feb9b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,4 @@ +#![target.'cfg_attr(feature = "unstable", feature(unstable))'] #cargo-features = ["profile-rustflags"] [workspace] @@ -7,7 +8,7 @@ members = [ resolver = "3" [workspace.package] -version = "0.6.13-pre" +version = "0.6.13" authors = ["Masato TOYOSHIMA", "phoepsilonix "] edition = "2021" rust-version = "1.84" @@ -20,18 +21,15 @@ license = "MIT" lib-dict-to-mozc = { path = "./crates/dict-to-mozc" } argh = { version = "0.1.13", default-features = false, features = [ "help" ] } csv = { version = "1.3.1", default-features = true } -kanaria = { git = "https://github.com/phoepsilonix/kanaria.git", rev = "18ca812a1fe8c7f30a753aecc2681db1f18031e8", version = "0.2.1", default-features = false } +kanaria = { version = "0.2.0", default-features = false } lazy-regex = { version = "3.4.1", default-features = false, features = [ "perf-dfa", "unicode" ] } indexmap = { version = "2.7.0", default-features = false, features = [] } hashbrown = { version = "0.15.2", default-features = false, features = [ "allocator-api2", "default-hasher", "equivalent", "inline-more", "raw-entry"] } -mimalloc-rust = { version = "0.2.1" } +mimalloc-rust = { version = "0.2.1", default-features = false } mimalloc = { version = "0.1.43" } snmalloc-rs = { version = "0.3.7", features = ["lto"] } tcmalloc = { version = "0.3.0" } -#allocator-api2 = { version = "0.2.21", default-features = false, features = [] } -#foldhash = "0.1.3" -#fxhash = "0.2.1" [profile.release] debug = true @@ -62,6 +60,10 @@ repository.workspace = true license.workspace = true version.workspace = true +[patch.crates-io] +cc = { git = "https://github.com/rust-lang/cc-rs.git", rev = "2e74353eb1d021ed272bc606242b2c700de9cbaa" } +kanaria = { git = "https://github.com/samunohito/kanaria.git", rev = "18ca812a1fe8c7f30a753aecc2681db1f18031e8" } + [dependencies] argh.workspace = true csv.workspace = true @@ -70,9 +72,10 @@ indexmap.workspace = true kanaria.workspace = true lazy-regex.workspace = true lib-dict-to-mozc = { workspace = true } -mimalloc-rust = { workspace = true , optional = true } -#[target.'cfg(any(not(any(target_arch = "arm", target_arch = "aarch64")),all(target_arch = "aarch64", not(target_os = "windows"))))'.dependencies] +mimalloc-rust = { workspace = true, optional = true, features = [] , default-features = false } + +[target.'cfg(any(not(any(target_arch = "arm", target_arch = "aarch64")),all(target_arch = "aarch64", not(target_os = "windows"))))'.dependencies] mimalloc = { workspace = true , optional = true } snmalloc-rs = { workspace = true , optional = true } tcmalloc = { workspace = true , optional = true } @@ -86,6 +89,8 @@ name = "dict-to-mozc" [features] default = [] +unstable = [ "unstable-mimalloc" ] +unstable-mimalloc = [ "mimalloc-rust/unstable" ] use-mimalloc-rs = ["dep:mimalloc-rust"] use-mimalloc = ["dep:mimalloc"] diff --git a/dist-workspace.toml b/dist-workspace.toml index 50ed1bb..61ba10c 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -3,6 +3,7 @@ members = ["cargo:."] # Config for 'dist' [dist] +build-command = ["cargo", "build"] # Features to pass to cargo build features = ["use-mimalloc-rs"] # The preferred dist version to use in CI (Cargo.toml SemVer syntax)