Skip to content

Commit 49720ba

Browse files
authored
Feat/rust backend (#12)
Rust backend for all tests and data format.
1 parent f68d135 commit 49720ba

43 files changed

Lines changed: 10058 additions & 1238 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.benchmarks/Linux-CPython-3.12-64bit/0003_illico-speed-bench.json

Lines changed: 917 additions & 0 deletions
Large diffs are not rendered by default.

.benchmarks/Linux-CPython-3.12-64bit/0005_illico-speed-bench-rust.json

Lines changed: 933 additions & 0 deletions
Large diffs are not rendered by default.

.benchmarks/Linux-CPython-3.12-64bit/0006_illico-speed-bench-numba.json

Lines changed: 933 additions & 0 deletions
Large diffs are not rendered by default.

.benchmarks/Linux-CPython-3.12-64bit/0007_illico-scaling-w-threads-rust.json

Lines changed: 1113 additions & 0 deletions
Large diffs are not rendered by default.

.benchmarks/Linux-CPython-3.12-64bit/0008_illico-scaling-w-threads-numba.json

Lines changed: 1113 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/maturin-CI.yaml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# This file is autogenerated by maturin v1.12.6
2+
# To update, run
3+
#
4+
# maturin generate-ci github
5+
#
6+
name: CI
7+
8+
on:
9+
release:
10+
types: [published]
11+
branches: [main]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
linux:
18+
runs-on: ${{ matrix.platform.runner }}
19+
strategy:
20+
matrix:
21+
platform:
22+
- runner: ubuntu-22.04
23+
target: x86_64
24+
- runner: ubuntu-22.04
25+
target: x86
26+
- runner: ubuntu-22.04
27+
target: aarch64
28+
- runner: ubuntu-22.04
29+
target: armv7
30+
- runner: ubuntu-22.04
31+
target: s390x
32+
- runner: ubuntu-22.04
33+
target: ppc64le
34+
steps:
35+
- uses: actions/checkout@v6
36+
- uses: actions/setup-python@v6
37+
with:
38+
python-version: 3.x
39+
- name: Build wheels
40+
uses: PyO3/maturin-action@v1
41+
with:
42+
target: ${{ matrix.platform.target }}
43+
args: --release --out dist --find-interpreter
44+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
45+
manylinux: auto
46+
- name: Upload wheels
47+
uses: actions/upload-artifact@v6
48+
with:
49+
name: wheels-linux-${{ matrix.platform.target }}
50+
path: dist
51+
52+
musllinux:
53+
runs-on: ${{ matrix.platform.runner }}
54+
strategy:
55+
matrix:
56+
platform:
57+
- runner: ubuntu-22.04
58+
target: x86_64
59+
- runner: ubuntu-22.04
60+
target: x86
61+
- runner: ubuntu-22.04
62+
target: aarch64
63+
- runner: ubuntu-22.04
64+
target: armv7
65+
steps:
66+
- uses: actions/checkout@v6
67+
- uses: actions/setup-python@v6
68+
with:
69+
python-version: 3.x
70+
- name: Build wheels
71+
uses: PyO3/maturin-action@v1
72+
with:
73+
target: ${{ matrix.platform.target }}
74+
args: --release --out dist --find-interpreter
75+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
76+
manylinux: musllinux_1_2
77+
- name: Upload wheels
78+
uses: actions/upload-artifact@v6
79+
with:
80+
name: wheels-musllinux-${{ matrix.platform.target }}
81+
path: dist
82+
83+
windows:
84+
runs-on: ${{ matrix.platform.runner }}
85+
strategy:
86+
matrix:
87+
platform:
88+
- runner: windows-latest
89+
target: x64
90+
python_arch: x64
91+
- runner: windows-latest
92+
target: x86
93+
python_arch: x86
94+
- runner: windows-11-arm
95+
target: aarch64
96+
python_arch: arm64
97+
steps:
98+
- uses: actions/checkout@v6
99+
- uses: actions/setup-python@v6
100+
with:
101+
python-version: 3.13
102+
architecture: ${{ matrix.platform.python_arch }}
103+
- name: Build wheels
104+
uses: PyO3/maturin-action@v1
105+
with:
106+
target: ${{ matrix.platform.target }}
107+
args: --release --out dist --find-interpreter
108+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
109+
- name: Upload wheels
110+
uses: actions/upload-artifact@v6
111+
with:
112+
name: wheels-windows-${{ matrix.platform.target }}
113+
path: dist
114+
115+
macos:
116+
runs-on: ${{ matrix.platform.runner }}
117+
strategy:
118+
matrix:
119+
platform:
120+
- runner: macos-15-intel
121+
target: x86_64
122+
- runner: macos-latest
123+
target: aarch64
124+
steps:
125+
- uses: actions/checkout@v6
126+
- uses: actions/setup-python@v6
127+
with:
128+
python-version: 3.x
129+
- name: Build wheels
130+
uses: PyO3/maturin-action@v1
131+
with:
132+
target: ${{ matrix.platform.target }}
133+
args: --release --out dist --find-interpreter
134+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
135+
- name: Upload wheels
136+
uses: actions/upload-artifact@v6
137+
with:
138+
name: wheels-macos-${{ matrix.platform.target }}
139+
path: dist
140+
141+
sdist:
142+
runs-on: ubuntu-latest
143+
steps:
144+
- uses: actions/checkout@v6
145+
- name: Build sdist
146+
uses: PyO3/maturin-action@v1
147+
with:
148+
command: sdist
149+
args: --out dist
150+
- name: Upload sdist
151+
uses: actions/upload-artifact@v6
152+
with:
153+
name: wheels-sdist
154+
path: dist
155+
156+
release:
157+
name: Release
158+
runs-on: ubuntu-latest
159+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
160+
needs: [linux, musllinux, windows, macos, sdist]
161+
permissions:
162+
# Use to sign the release artifacts
163+
id-token: write
164+
# Used to upload release artifacts
165+
contents: write
166+
# Used to generate artifact attestation
167+
attestations: write
168+
steps:
169+
- uses: actions/download-artifact@v7
170+
- name: Generate artifact attestation
171+
uses: actions/attest-build-provenance@v3
172+
with:
173+
subject-path: 'wheels-*/*'
174+
- name: Install uv
175+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
176+
uses: astral-sh/setup-uv@v7
177+
- name: Publish to PyPI
178+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
179+
run: uv publish 'wheels-*/*'
180+
env:
181+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}

.github/workflows/publish-package.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/python-package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.11", "3.12", "3.13"]
18+
python-version: ["3.11", "3.12", "3.13", "3.14"]
1919
steps:
2020
- uses: actions/checkout@v3
2121
- name: Set up Python ${{ matrix.python-version }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ tests/data/
1616
.tox
1717
*.ipynb
1818

19-
docs/_build
2019

20+
# Added by cargo
21+
docs/_build
22+
/target
2123
.DS_Store
24+
*.so

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,20 @@ repos:
1818
rev: "v0.14.1"
1919
hooks:
2020
- id: ruff
21+
- repo: local
22+
hooks:
23+
- id: cargo-fmt
24+
name: cargo fmt (rust))
25+
entry: bash -lc 'rustup component add rustfmt >/dev/null 2>&1 || true; cargo fmt --all --'
26+
language: system
27+
files: '\.rs$'
28+
- id: cargo-fix
29+
name: cargo fix (rust)
30+
entry: bash -lc 'cargo fix --all --allow-dirty --allow-staged'
31+
language: system
32+
files: '\.rs$'
33+
# - id: cargo-clippy
34+
# name: cargo clippy (rust) (optional)
35+
# entry: bash -lc 'rustup component add clippy >/dev/null 2>&1 || true; cargo clippy --all -- -D warnings'
36+
# language: system
37+
# files: '\.rs$'

0 commit comments

Comments
 (0)