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
37 changes: 27 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,38 @@ jobs:
- {
runner: ubuntu-latest,
target: x86_64,
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "--features mimalloc",
}
- {
runner: ubuntu-latest,
target: x86,
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "--features mimalloc",
}
- {
runner: ubuntu-latest,
target: aarch64,
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "--features mimalloc --zig",
}
- {
runner: ubuntu-latest,
target: armv7,
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "",
}
- {
runner: ubuntu-latest,
target: s390x,
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "",
}
- {
runner: ubuntu-latest,
target: ppc64le,
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "",
}
steps:
- uses: actions/checkout@v5
Expand All @@ -56,7 +62,9 @@ jobs:
uses: PyO3/[email protected]
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
args: >
--release --out dist ${{ matrix.platform.maturin-args }}
--interpreter ${{ matrix.platform.interpreter }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
rust-toolchain: nightly
Expand Down Expand Up @@ -104,7 +112,10 @@ jobs:
uses: PyO3/[email protected]
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
args: >
--release --out dist
--interpreter ${{ matrix.platform.interpreter }}
--features mimalloc
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
rust-toolchain: nightly
Expand Down Expand Up @@ -142,7 +153,10 @@ jobs:
uses: PyO3/[email protected]
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
args: >
--release --out dist
--interpreter ${{ matrix.platform.interpreter }}
--features mimalloc
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
rust-toolchain: nightly

Expand Down Expand Up @@ -180,7 +194,10 @@ jobs:
uses: PyO3/[email protected]
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
args: >
--release --out dist
--interpreter ${{ matrix.platform.interpreter }}
--features mimalloc
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
rust-toolchain: nightly

Expand Down
9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ features = ["inline-more", "raw"]
version = "2.3.0"

[dependencies.pyo3]
version = "0.27.0"
version = "0.27.1"
default-features = false
features = ["macros", "extension-module", "generate-import-lib"]

Expand All @@ -40,8 +40,13 @@ version = "1.0.3"
[dependencies.parking_lot]
version = "0.12.5"

[dependencies.mimalloc]
version = "0.1.48"
features = ["v3", "override"]
optional = true

[build-dependencies.pyo3-build-config]
version = "0.27.0"
version = "0.27.1"
features = ["resolve-config"]

[lints.clippy]
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ mod common;
mod bridge;
mod policies;

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

/// cachebox core ( written in Rust )
#[pyo3::pymodule(gil_used = false)]
mod _core {
Expand Down