diff --git a/Cargo.lock b/Cargo.lock index 2aff81a9..4e10605e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -447,6 +447,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "cty" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" + [[package]] name = "dashmap" version = "5.5.3" @@ -1090,6 +1096,26 @@ dependencies = [ "syn", ] +[[package]] +name = "mimalloc-rust" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb726c8298efb4010b2c46d8050e4be36cf807b9d9e98cb112f830914fc9bbe" +dependencies = [ + "cty", + "mimalloc-rust-sys", +] + +[[package]] +name = "mimalloc-rust-sys" +version = "1.7.9-source" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6413e13241a9809f291568133eca6694572cf528c1a6175502d090adce5dd5db" +dependencies = [ + "cc", + "cty", +] + [[package]] name = "mime" version = "0.3.17" @@ -1343,6 +1369,7 @@ dependencies = [ "pipe-trait", "pretty_assertions", "serde_json", + "swc_malloc", "tempfile", "tokio", "walkdir", @@ -2223,6 +2250,16 @@ dependencies = [ "is-terminal", ] +[[package]] +name = "swc_malloc" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a279493814466a779ac93921b8a88fbd9f9162807e564d64dbbae2edee00c8a" +dependencies = [ + "mimalloc-rust", + "tikv-jemallocator", +] + [[package]] name = "syn" version = "2.0.28" @@ -2336,6 +2373,26 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + [[package]] name = "tinytemplate" version = "1.2.1" diff --git a/Cargo.toml b/Cargo.toml index 6d07465e..15e4ea6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,7 @@ pacquet-store-dir = { path = "crates/store-dir" } pacquet-registry-mock = { path = "tasks/registry-mock" } # Dependencies + advisory-lock = { version = "0.3.0" } async-recursion = { version = "1.0.5" } clap = { version = "4", features = ["derive", "string"] } @@ -62,6 +63,7 @@ split-first-char = { version = "0.0.0" } ssri = { version = "9.0.0" } strum = { version = "0.25.0", features = ["derive"] } sysinfo = { version = "0.29.10" } +swc_malloc = { version = "0.5.9" } tar = { version = "0.4.40" } text-block-macros = { version = "0.1.1" } tracing = { version = "0.1.40" } diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 696751cf..cda9650e 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -32,6 +32,7 @@ home = { workspace = true } miette = { workspace = true } pipe-trait = { workspace = true } tokio = { workspace = true } +swc_malloc = { workspace = true } [dev-dependencies] pacquet-store-dir = { workspace = true } diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 67989365..a286ff24 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -1,3 +1,5 @@ +extern crate swc_malloc; + mod cli_args; mod state; diff --git a/package.json b/package.json new file mode 100644 index 00000000..5554772f --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC" +} \ No newline at end of file