Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions vortex-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ default = ["extension-module", "tui"]
# duplicate PyInit__lib symbols.
extension-module = []
tui = ["dep:vortex-tui"]
# Set the default allocator to mimalloc, this is enabled by default
# for the maturin wheels, but it is not a default feature to not conflict
# with users that set a different global allocator.
mimalloc = ["dep:mimalloc"]

[dependencies]
arrow-array = { workspace = true }
Expand All @@ -36,6 +40,7 @@ arrow-schema = { workspace = true }
bytes = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
mimalloc = { workspace = true, optional = true }
object_store = { workspace = true, features = [
"fs",
"aws",
Expand Down
2 changes: 1 addition & 1 deletion vortex-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ managed = true
[tool.maturin]
python-source = "python"
module-name = "vortex._lib"
features = ["pyo3/extension-module"]
features = ["pyo3/extension-module", "mimalloc"]
compatibility = "manylinux2014"
include = [
{ path = "rust-toolchain.toml", format = "sdist" },
Expand Down
4 changes: 4 additions & 0 deletions vortex-python/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

use std::ops::Deref;
use std::sync::LazyLock;

Expand Down
Loading