mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-31 13:54:27 +01:00
Merge 'bindings/rust: Enable mimalloc as global allocator' from Pekka Enberg
This improves performance by using mimalloc for memory allocation in the Rust bindings. Closes #3839
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -4838,6 +4838,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||
name = "turso"
|
||||
version = "0.3.0-pre.4"
|
||||
dependencies = [
|
||||
"mimalloc",
|
||||
"rand 0.9.2",
|
||||
"rand_chacha 0.9.0",
|
||||
"tempfile",
|
||||
|
||||
@@ -21,6 +21,7 @@ turso_core = { workspace = true, features = ["io_uring"] }
|
||||
thiserror = { workspace = true }
|
||||
tracing-subscriber.workspace = true
|
||||
tracing.workspace = true
|
||||
mimalloc = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = { workspace = true }
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
//! # }
|
||||
//! ```
|
||||
|
||||
#[cfg(all(not(target_family = "wasm"), not(miri)))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
pub mod params;
|
||||
mod rows;
|
||||
pub mod transaction;
|
||||
|
||||
Reference in New Issue
Block a user