Skip to content

Commit f110dbe

Browse files
committed
build update
Windows i686 dropped due to link errors on all versions, e.g.: error LNK2019: unresolved external symbol __imp____Py_Dealloc referenced in function
1 parent 6737895 commit f110dbe

15 files changed

Lines changed: 130 additions & 152 deletions

File tree

‎.github/workflows/artifact.yaml‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
FORCE_COLOR: "1"
88
ORJSON_BUILD_FREETHREADED: "1"
99
PIP_DISABLE_PIP_VERSION_CHECK: "1"
10-
RUST_TOOLCHAIN: "nightly-2026-08-01"
10+
RUST_TOOLCHAIN: "nightly-2026-10-01"
1111
RUST_TOOLCHAIN_STABLE: "1.95"
1212
RUSTUP_TERM_PROGRESS_WHEN: "never"
1313
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
@@ -105,10 +105,10 @@ jobs:
105105
arch:
106106
- arch: "x86_64"
107107
runner: "ubuntu-26.04"
108-
features: "avx512,optimize,no_panic"
108+
features: "avx512,nightly"
109109
- arch: "aarch64"
110110
runner: "ubuntu-26.04-arm"
111-
features: "generic_simd,optimize,no_panic"
111+
features: "generic_simd,nightly"
112112
env:
113113
CARGO_TARGET_DIR: "/tmp/orjson"
114114
CC: "clang"
@@ -149,6 +149,7 @@ jobs:
149149

150150
- run: ./integration/run init
151151
env:
152+
PYTHON_LAZY_IMPORTS: "all"
152153
PYTHONMALLOC: "debug"
153154

154155
- name: Store wheels
@@ -188,15 +189,15 @@ jobs:
188189
platform:
189190
- arch: "i686"
190191
cflags: "-Os -fstrict-aliasing"
191-
features: "no_panic,optimize"
192+
features: "nightly"
192193
image: "quay.io/pypa/manylinux_2_34_i686:latest"
193194
runner: "ubuntu-26.04"
194195
rustflags: "-Z unstable-options -C panic=immediate-abort -Z mir-opt-level=4 -D warnings"
195196
tag: "i686"
196197
target: "i686-unknown-linux-gnu"
197198
- arch: "armv7"
198199
cflags: "-Os -fstrict-aliasing"
199-
features: "no_panic,optimize"
200+
features: "nightly"
200201
image: "quay.io/pypa/manylinux_2_35_armv7l:latest"
201202
runner: "ubuntu-26.04-arm"
202203
rustflags: "-Z unstable-options -C panic=immediate-abort -Z mir-opt-level=4 -D warnings -C opt-level=s"
@@ -254,7 +255,7 @@ jobs:
254255
platform:
255256
- arch: "x86_64"
256257
cflags: "-O2 -fstrict-aliasing"
257-
features: "avx512,no_panic,optimize,unwind"
258+
features: "avx512,nightly,unwind"
258259
image: "quay.io/pypa/musllinux_1_2_x86_64:latest"
259260
platform: "linux/amd64"
260261
runner: "ubuntu-26.04"
@@ -263,7 +264,7 @@ jobs:
263264
target: "x86_64-unknown-linux-musl"
264265
- arch: "aarch64"
265266
cflags: "-O2 -fstrict-aliasing"
266-
features: "generic_simd,no_panic,optimize,unwind"
267+
features: "generic_simd,nightly,unwind"
267268
image: "quay.io/pypa/musllinux_1_2_aarch64:latest"
268269
platform: "linux/arm64"
269270
runner: "ubuntu-26.04-arm"
@@ -337,7 +338,7 @@ jobs:
337338
CFLAGS: "-O2 -fstrict-aliasing -fno-plt -mcpu=apple-m1 -mtune=generic"
338339
LDFLAGS: "-Wl,--as-needed"
339340
MACOSX_DEPLOYMENT_TARGET: "15.0"
340-
ORJSON_FEATURES: "generic_simd,no_panic,optimize"
341+
ORJSON_FEATURES: "generic_simd,nightly"
341342
PATH: "/Users/runner/work/orjson/orjson/.venv/bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin"
342343
PYTHON: "python${{ matrix.python.version }}"
343344
RUST_TOOLCHAIN: "${{ env.RUST_TOOLCHAIN }}"
@@ -419,7 +420,7 @@ jobs:
419420
maturin build \
420421
--release \
421422
--strip \
422-
--features=generic_simd,no_panic,optimize \
423+
--features=generic_simd,nightly \
423424
--interpreter python${{ matrix.python.version }} \
424425
--target=universal2-apple-darwin
425426
uv pip install target/wheels/orjson*.whl
@@ -458,13 +459,13 @@ jobs:
458459
{ version: '3.11', publish: true },
459460
]
460461
platform: [
461-
{ arch: "arm64", target: "aarch64-pc-windows-msvc", "runner": "windows-11-vs2026-arm", features: "generic_simd,no_panic,optimize" },
462-
{ arch: "x64", target: "x86_64-pc-windows-msvc", "runner": "windows-2025-vs2026", features: "avx512,no_panic,optimize" },
463-
{ arch: "x86", target: "i686-pc-windows-msvc", "runner": "windows-2025-vs2026", features: "no_panic,optimize" },
462+
{ arch: "arm64", target: "aarch64-pc-windows-msvc", "runner": "windows-11-vs2026-arm", features: "generic_simd,nightly" },
463+
{ arch: "x64", target: "x86_64-pc-windows-msvc", "runner": "windows-2025-vs2026", features: "avx512,nightly" },
464464
]
465465
env:
466466
CFLAGS: "-O2"
467467
LDFLAGS: "-Wl,--as-needed"
468+
PYO3_USE_RAW_DYLIB: "0"
468469
RUSTFLAGS: "-Z unstable-options -C panic=immediate-abort -Z mir-opt-level=4 -D warnings"
469470
steps:
470471

@@ -529,12 +530,12 @@ jobs:
529530
{ version: '3.10', publish: true },
530531
]
531532
platform: [
532-
{ arch: "x64", target: "x86_64-pc-windows-msvc", "runner": "windows-2025-vs2026", features: "avx512,no_panic,optimize" },
533-
{ arch: "x86", target: "i686-pc-windows-msvc", "runner": "windows-2025-vs2026", features: "no_panic,optimize" },
533+
{ arch: "x64", target: "x86_64-pc-windows-msvc", "runner": "windows-2025-vs2026", features: "avx512,nightly" },
534534
]
535535
env:
536536
CFLAGS: "-O2"
537537
LDFLAGS: "-Wl,--as-needed"
538+
PYO3_USE_RAW_DYLIB: "0"
538539
RUSTFLAGS: "-Z unstable-options -C panic=immediate-abort -Z mir-opt-level=4 -D warnings"
539540
steps:
540541

‎.github/workflows/unusual.yaml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
cfg: [
17-
{ rust: "1.95", python: "3.15", version_check: "1" },
18-
{ rust: "1.95", python: "3.14", version_check: "0" },
19-
{ rust: "1.95", python: "3.10", version_check: "0" },
17+
{ rust: "1.95", python: "3.15" },
18+
{ rust: "1.95", python: "3.10" },
2019
]
2120
steps:
2221
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain ${{ matrix.cfg.rust }} --profile minimal -y
@@ -31,8 +30,10 @@ jobs:
3130
- uses: actions/checkout@v7
3231

3332
- name: build
33+
env:
34+
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
3435
run: |
35-
PATH="$HOME/.cargo/bin:$PATH" UNSAFE_PYO3_SKIP_VERSION_CHECK="${{ matrix.cfg.version_check }}" \
36+
PATH="$HOME/.cargo/bin:$PATH" \
3637
maturin build \
3738
--profile=dev \
3839
--interpreter python${{ matrix.cfg.python }} \

‎Cargo.lock‎

Lines changed: 18 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,25 @@ avx512 = []
3737
generic_simd = []
3838
inline_int = []
3939
inline_str = []
40-
no_panic = ["zmij/no-panic"]
40+
nightly = ["optimize", "zmij/no-panic", "trusted_len"]
4141
optimize = []
4242
trusted_len = []
4343

4444
[dependencies]
4545
associative-cache = { version = "3", default-features = false }
4646
bytecount = { version = "^0.6.7", default-features = false, features = ["runtime-dispatch-simd"] }
47-
encoding_rs = { version = "0.8", default-features = false }
4847
itoap = { version = "1", default-features = false, features = ["std", "simd"] }
4948
jiff-core = { version = "0.1", default-features = false }
5049
once_cell = { version = "1", default-features = false, features = ["alloc", "race"] }
51-
pyo3-ffi = { version = "0.28", default-features = false }
50+
pyo3-ffi = { version = "0.29", default-features = false }
5251
simdutf8 = { version = "0.1", default-features = false, features = ["std", "public_imp", "aarch64_neon"] }
5352
unwinding = { version = "=0.2.10", default-features = false, features = ["unwinder"], optional = true }
5453
xxhash-rust = { version = "^0.8", default-features = false, features = ["xxh3"] }
5554
zmij = { version = "1", default-features = false }
5655

5756
[build-dependencies]
5857
cc = { version = "1" }
59-
pyo3-build-config = { version = "0.28" }
58+
pyo3-build-config = { version = "0.29" }
6059

6160
[profile.dev]
6261
codegen-units = 1

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ The recommended build command is:
10771077
maturin build --release --strip
10781078
```
10791079

1080-
The project's own CI tests against `nightly-2026-08-01` and stable 1.95. It
1080+
The project's own CI tests against `nightly-2026-10-01` and stable 1.95. It
10811081
is prudent to pin the nightly version because that channel can introduce
10821082
breaking changes. There is a significant performance benefit to using
10831083
nightly.

‎build.rs‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,26 @@ fn main() {
99
}
1010

1111
#[allow(unused_variables)]
12-
let is_64_bit_python = matches!(python_config.pointer_width, Some(64));
12+
let is_64_bit_python = matches!(python_config.pointer_width(), Some(64));
1313

14-
match python_config.implementation {
14+
match python_config.implementation() {
1515
pyo3_build_config::PythonImplementation::CPython => {
1616
println!("cargo:rustc-cfg=CPython");
17-
if python_config.abi3 {
17+
let is_abi3 = matches!(
18+
python_config.target_abi().kind(),
19+
pyo3_build_config::PythonAbiKind::Stable(_)
20+
);
21+
if is_abi3 {
1822
println!("cargo:rustc-cfg=Py_LIMITED_ABI");
1923
}
2024
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
21-
if is_64_bit_python && !python_config.abi3 {
25+
if is_64_bit_python && !is_abi3 {
2226
println!("cargo:rustc-cfg=feature=\"inline_int\"");
2327
#[cfg(target_endian = "little")]
2428
println!("cargo:rustc-cfg=feature=\"inline_str\"");
2529
}
2630
}
27-
_ => not_supported(&python_config.implementation.to_string()),
31+
_ => not_supported(&python_config.implementation().to_string()),
2832
}
2933

3034
for cfg in python_config.build_script_outputs() {
@@ -40,6 +44,7 @@ fn main() {
4044
println!("cargo:rerun-if-env-changed=RUSTFLAGS");
4145
println!("cargo:rustc-check-cfg=cfg(CPython)");
4246
println!("cargo:rustc-check-cfg=cfg(GraalPy)");
47+
println!("cargo:rustc-check-cfg=cfg(nightly)");
4348
println!("cargo:rustc-check-cfg=cfg(optimize)");
4449
println!("cargo:rustc-check-cfg=cfg(Py_3_10)");
4550
println!("cargo:rustc-check-cfg=cfg(Py_3_11)");

‎script/check-pypi‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ MUSLLINUX = [
4545
"musllinux_1_2_x86_64",
4646
]
4747

48-
WIN_AMD64_I686 = [
49-
"win32",
48+
WIN_AMD64 = [
5049
"win_amd64",
5150
]
5251

@@ -66,7 +65,7 @@ for abi in ABIS:
6665
tags = []
6766
tags.extend(MACOS_UNIVERSAL2)
6867
tags.extend(MUSLLINUX)
69-
tags.extend(WIN_AMD64_I686)
68+
tags.extend(WIN_AMD64)
7069

7170
if abi > "cp310-cp310":
7271
tags.extend(MACOS_ARM64)

‎script/develop‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export CC="${CC:-clang}"
1212
export LD="${LD:-lld}"
1313
export TARGET="${TARGET:-x86_64-unknown-linux-gnu}"
1414
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-target}"
15-
export ORJSON_COMPATIBILITY="${ORJSON_COMPATIBILITY:-manylinux_2_17}"
15+
export ORJSON_COMPATIBILITY="${ORJSON_COMPATIBILITY:-manylinux_2_39}"
1616

1717
echo "CC: ${CC}, LD: ${LD}, LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}"
1818

@@ -22,6 +22,6 @@ export RUSTFLAGS="-C linker=${CC} -C link-arg=-fuse-ld=${LD} -C linker-plugin-lt
2222

2323
rm -f ${CARGO_TARGET_DIR}/wheels/*.whl
2424

25-
maturin build --target="${TARGET}" --features=no_panic,optimize --compatibility="${ORJSON_COMPATIBILITY}" --release
25+
maturin build --target="${TARGET}" --features=nightly --compatibility="${ORJSON_COMPATIBILITY}" --release
2626

2727
uv pip install --link-mode=copy ${CARGO_TARGET_DIR}/wheels/*.whl

0 commit comments

Comments
 (0)