Skip to content

Commit

Permalink
add mimalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
yinqiwen committed Dec 12, 2023
1 parent 828c25c commit 0304196
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ metrics = "0.21"
metrics-util = "0.15"
time = "0.3"
pki-types = { package = "rustls-pki-types", version = "1" }
[target.'cfg(not(target_arch = "arm"))'.dependencies]
mimalloc = { version = "*" }
s2n-quic = { version = "1", optional = true }
quinn = { version = "0.10", optional = true }


[target.'cfg(not(target_os = "windows"))'.dependencies]
aws-lc-rs = { version = "1.5", features = ["bindgen"], optional = true }


[features]
default = ["s2n_quic"]
s2n_quic = ["dep:s2n-quic", "dep:aws-lc-rs"]
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ mod mux;
mod tunnel;
mod utils;

#[cfg(not(target_arch = "arm"))]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

#[derive(ValueEnum, Clone, Debug)]
enum Protocol {
Tls,
Expand Down

0 comments on commit 0304196

Please sign in to comment.