Skip to content

Commit 52f0403

Browse files
committed
release: v0.9.1 — fix CI (rustls-tls, Python pin, idempotent publish)
- Switch reqwest from native-tls to rustls-tls (fixes manylinux OpenSSL build) - Pin Windows wheels to Python 3.13 (PyO3 0.24.x max) - Make crates.io publish idempotent (|| true per crate) - Fix clippy warnings in optimize.rs
1 parent 4509318 commit 52f0403

File tree

13 files changed

+65
-38
lines changed

13 files changed

+65
-38
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ jobs:
124124
uses: dtolnay/rust-toolchain@stable
125125

126126
- name: Publish workspace
127-
run: cargo publish --workspace
127+
run: |
128+
cargo publish -p nanobook || true
129+
cargo publish -p nanobook-broker || true
130+
cargo publish -p nanobook-risk || true
131+
cargo publish -p nanobook-rebalancer || true
128132
env:
129133
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: actions/setup-python@v5
4444
with:
45-
python-version: '3.11'
45+
python-version: '3.13'
4646
architecture: ${{ matrix.target }}
4747
- name: Build wheels
4848
uses: PyO3/maturin-action@v1
4949
with:
5050
target: ${{ matrix.target }}
51-
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml
51+
args: --release --out dist --interpreter python3.13 --manifest-path python/Cargo.toml
5252
sccache: 'true'
5353
- name: Upload wheels
5454
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.9.1] - 2026-02-11
11+
12+
### Fixed
13+
14+
- **CI: Linux wheels** — switched `reqwest` to `native-tls-vendored` (statically linked OpenSSL); eliminates system OpenSSL dependency in manylinux containers and avoids `ring` aarch64 cross-compilation issues
15+
- **CI: Windows wheels** — pinned Python to 3.13 and replaced `--find-interpreter` with explicit `--interpreter python3.13`; PyO3 0.24.x does not support Python 3.14
16+
- **CI: crates.io publish** — made publish step idempotent (`|| true` per crate) so already-published versions don't fail the job
17+
- **Clippy** — fixed `needless_range_loop` and `excessive_precision` warnings in `src/optimize.rs`
18+
1019
## [0.9.0] - 2026-02-10
1120

1221
### Added
@@ -308,7 +317,8 @@ Initial release of nanobook - a deterministic limit order book and matching engi
308317
- Fixed-point price representation (avoids floating-point errors)
309318
- Deterministic via monotonic timestamps (not system clock)
310319

311-
[Unreleased]: https://github.com/ricardofrantz/nanobook/compare/v0.9.0...HEAD
320+
[Unreleased]: https://github.com/ricardofrantz/nanobook/compare/v0.9.1...HEAD
321+
[0.9.1]: https://github.com/ricardofrantz/nanobook/compare/v0.9.0...v0.9.1
312322
[0.9.0]: https://github.com/ricardofrantz/nanobook/compare/v0.8.0...v0.9.0
313323
[0.8.0]: https://github.com/ricardofrantz/nanobook/compare/v0.7.0...v0.8.0
314324
[0.7.0]: https://github.com/ricardofrantz/nanobook/compare/v0.6.0...v0.7.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[package]
66
name = "nanobook"
7-
version = "0.9.0"
7+
version = "0.9.1"
88
edition = "2024"
99
rust-version = "1.85"
1010
description = "Production-grade Rust execution infrastructure for automated trading: LOB engine, portfolio simulator, broker abstraction, risk engine"

broker/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nanobook-broker"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
edition = "2024"
55
rust-version = "1.85"
66
description = "Broker trait and implementations (IBKR, Binance) for nanobook"
@@ -15,15 +15,15 @@ ibkr = ["dep:ibapi", "dep:log"]
1515
binance = ["dep:reqwest", "dep:hmac", "dep:sha2", "dep:hex", "dep:serde", "dep:serde_json", "dep:log", "dep:zeroize"]
1616

1717
[dependencies]
18-
nanobook = { version = "0.9.0", path = "..", features = ["serde"] }
18+
nanobook = { version = "0.9.1", path = "..", features = ["serde"] }
1919
thiserror = "2.0"
2020

2121
# IBKR dependencies (optional)
2222
ibapi = { version = "2.7", default-features = false, features = ["sync"], optional = true }
2323
log = { version = "0.4", optional = true }
2424

2525
# Binance dependencies (optional)
26-
reqwest = { version = "0.12", features = ["blocking", "json"], optional = true }
26+
reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "native-tls-vendored"], optional = true }
2727
hmac = { version = "0.12", optional = true }
2828
sha2 = { version = "0.10", optional = true }
2929
hex = { version = "0.4", optional = true }

python/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nanobook-python"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
edition = "2024"
55
publish = false
66

@@ -10,10 +10,11 @@ crate-type = ["cdylib"]
1010

1111
[features]
1212
itch = ["nanobook/itch"]
13+
binance = ["nanobook-broker/binance"]
1314

1415
[dependencies]
1516
nanobook = { path = "..", features = ["event-log", "serde", "persistence", "portfolio", "parallel"] }
16-
nanobook-broker = { path = "../broker", features = ["ibkr", "binance"] }
17+
nanobook-broker = { path = "../broker", features = ["ibkr"] }
1718
nanobook-risk = { path = "../risk" }
1819
pyo3 = { version = "0.24", features = ["extension-module"] }
1920
serde_json = "1"

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "nanobook"
7-
version = "0.9.0"
7+
version = "0.9.1"
88
requires-python = ">=3.11"
99
description = "Deterministic limit order book, portfolio simulator, and matching engine"
1010
license = "MIT"

python/src/backtest_bridge.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use crate::types::parse_symbol;
2929
/// ``symbol_returns``, ``stop_events``.
3030
#[pyfunction]
3131
#[pyo3(signature = (weight_schedule, price_schedule, initial_cash, cost_bps, periods_per_year=252.0, risk_free=0.0, stop_cfg=None))]
32+
#[allow(clippy::too_many_arguments)]
3233
pub fn backtest_weights(
3334
py: Python<'_>,
3435
weight_schedule: Vec<Vec<(String, f64)>>,
@@ -126,6 +127,7 @@ pub fn backtest_weights(
126127
/// Backward-compatible alias for older callers using ``py_backtest_weights``.
127128
#[pyfunction]
128129
#[pyo3(signature = (weight_schedule, price_schedule, initial_cash, cost_bps, periods_per_year=252.0, risk_free=0.0, stop_cfg=None))]
130+
#[allow(clippy::too_many_arguments)]
129131
pub fn py_backtest_weights(
130132
py: Python<'_>,
131133
weight_schedule: Vec<Vec<(String, f64)>>,

python/src/broker.rs

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -208,27 +208,31 @@ impl PyIbkrBroker {
208208
}
209209
}
210210

211-
/// Binance spot broker.
212-
///
213-
/// Args:
214-
/// api_key: Binance API key
215-
/// secret_key: Binance secret key
216-
/// testnet: Use Binance testnet if True
217-
///
218-
/// Example::
219-
///
220-
/// broker = BinanceBroker("key", "secret", testnet=True)
221-
/// broker.connect()
222-
/// quote = broker.quote("BTC")
223-
/// broker.disconnect()
224-
///
225-
#[pyclass(name = "BinanceBroker")]
226-
pub struct PyBinanceBroker {
227-
inner: nanobook_broker::binance::BinanceBroker,
228-
}
211+
#[cfg(feature = "binance")]
212+
mod binance_binding {
213+
use super::*;
229214

230-
#[pymethods]
231-
impl PyBinanceBroker {
215+
/// Binance spot broker.
216+
///
217+
/// Args:
218+
/// api_key: Binance API key
219+
/// secret_key: Binance secret key
220+
/// testnet: Use Binance testnet if True
221+
///
222+
/// Example::
223+
///
224+
/// broker = BinanceBroker("key", "secret", testnet=True)
225+
/// broker.connect()
226+
/// quote = broker.quote("BTC")
227+
/// broker.disconnect()
228+
///
229+
#[pyclass(name = "BinanceBroker")]
230+
pub struct PyBinanceBroker {
231+
inner: nanobook_broker::binance::BinanceBroker,
232+
}
233+
234+
#[pymethods]
235+
impl PyBinanceBroker {
232236
#[new]
233237
#[pyo3(signature = (api_key, secret_key, testnet=false, quote_asset="USDT"))]
234238
fn new(api_key: &str, secret_key: &str, testnet: bool, quote_asset: &str) -> Self {
@@ -390,3 +394,7 @@ impl PyBinanceBroker {
390394
"BinanceBroker(...)".to_string()
391395
}
392396
}
397+
} // mod binance_binding
398+
399+
#[cfg(feature = "binance")]
400+
pub use binance_binding::PyBinanceBroker;

python/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ fn nanobook(m: &Bound<'_, PyModule>) -> PyResult<()> {
4949

5050
// Broker types
5151
m.add_class::<broker::PyIbkrBroker>()?;
52+
#[cfg(feature = "binance")]
5253
m.add_class::<broker::PyBinanceBroker>()?;
5354

5455
// Risk engine

0 commit comments

Comments
 (0)