Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
25 changes: 25 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Tell z3-sys's bindgen step where to find z3.h on common install layouts.
#
# Set when running `cargo build` / `maturin develop` from this directory.
# Users with z3 in a non-standard location can override via the env var:
#
# BINDGEN_EXTRA_CLANG_ARGS="-I/path/to/z3/include" cargo build
#
# Detection order matches the build script: Homebrew (Apple Silicon),
# /usr/local (Intel macOS / manual), and /usr (Debian/Ubuntu apt).

[env]
BINDGEN_EXTRA_CLANG_ARGS = { value = "-I/opt/homebrew/include -I/usr/local/include -I/usr/include", force = false }

# Help the linker find libz3 on common install layouts.
[target.aarch64-apple-darwin]
rustflags = ["-L/opt/homebrew/lib", "-L/usr/local/lib"]

[target.x86_64-apple-darwin]
rustflags = ["-L/usr/local/lib", "-L/opt/homebrew/lib"]

[target.x86_64-unknown-linux-gnu]
rustflags = ["-L/usr/lib", "-L/usr/local/lib"]

[target.aarch64-unknown-linux-gnu]
rustflags = ["-L/usr/lib", "-L/usr/local/lib"]
13 changes: 13 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ on:
pull_request:
branches: [master]

env:
# Harden the aeon-rs (cargo) build against transient crates.io download
# failures: curl's HTTP/2 multiplexing on the runners intermittently dies
# with "Error in the HTTP2 framing layer"; plain HTTP/1.1 + retries is the
# standard mitigation.
CARGO_HTTP_MULTIPLEXING: "false"
CARGO_NET_RETRY: "10"

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

Expand All @@ -22,6 +31,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies (libz3 for the aeon-rs build)
run: |
sudo apt-get update
sudo apt-get install -y libz3-dev
- name: Install dependencies
run: |
python -m pip install --upgrade uv
Expand Down
6 changes: 6 additions & 0 deletions aeon-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
target/
Cargo.lock
*.so
*.dylib
*.dll
__pycache__/
27 changes: 27 additions & 0 deletions aeon-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "aeon_rs"
version = "0.1.0"
edition = "2021"
description = "Rust core for Aeon: AST, type-checker, and interpreter via PyO3"

[lib]
name = "aeon_rs"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.22", features = ["extension-module", "abi3-py310"] }
# `z3` links dynamically against the system libz3 (install via
# `brew install z3` on macOS or `apt install libz3-dev` on Debian).
# The header / library paths are wired up via `.cargo/config.toml`.
# `Context<'ctx>` lifetimes are erased by leaking a single process-wide
# Context in smt_z3.rs; everything is then `'static`.
z3 = "0.12"
rand = { version = "0.8", features = ["small_rng"] }

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1

[profile.dev]
opt-level = 1
13 changes: 13 additions & 0 deletions aeon-rs/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[build-system]
requires = ["maturin>=1.4,<2.0"]
build-backend = "maturin"

[project]
name = "aeon_rs"
version = "0.1.0"
requires-python = ">=3.10"
description = "Rust core for Aeon"

[tool.maturin]
features = ["pyo3/extension-module"]
module-name = "aeon_rs"
Loading
Loading