From 9886f5e2f08bdf884b0f92951f915657ecf58fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Sun, 12 Nov 2023 05:24:50 +0900 Subject: [PATCH] swc_malloc --- Cargo.lock | 57 +++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 ++ crates/cli/Cargo.toml | 1 + crates/cli/src/lib.rs | 2 ++ package.json | 12 +++++++++ 5 files changed, 74 insertions(+) create mode 100644 package.json diff --git a/Cargo.lock b/Cargo.lock index 2aff81a97..4e10605ee 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 6d07465e2..15e4ea6c1 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 696751cfc..cda9650e3 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 679893657..a286ff249 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 000000000..5554772f1 --- /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