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
78 changes: 8 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('turbo/Cargo.lock') }}

- name: cargo clippy
run: cargo clippy --manifest-path turbo/Cargo.toml --workspace --exclude turbo-codegen-llvm --all-targets -- -D warnings
run: cargo clippy --manifest-path turbo/Cargo.toml --workspace --all-targets -- -D warnings

doc:
name: Rustdoc
Expand All @@ -65,12 +65,11 @@ jobs:

# Build all crate docs with warnings as errors. Catches broken
# intra-doc links, invalid HTML in doc comments, and busted Rust
# examples in doc-tests. The LLVM backend is excluded to keep this
# job hermetic — it has its own dedicated job below.
# examples in doc-tests.
- name: cargo doc
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo doc --no-deps --workspace --manifest-path turbo/Cargo.toml

test:
name: Unit tests (${{ matrix.os }})
Expand All @@ -95,7 +94,7 @@ jobs:
key: ${{ runner.os }}-cargo-test-${{ hashFiles('turbo/Cargo.lock') }}

- name: cargo test
run: cargo test --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo test --workspace --manifest-path turbo/Cargo.toml

integration:
name: Integration tests (${{ matrix.os }})
Expand All @@ -120,7 +119,7 @@ jobs:
key: ${{ runner.os }}-cargo-integration-${{ hashFiles('turbo/Cargo.lock') }}

- name: Build release
run: cargo build --release --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo build --release --workspace --manifest-path turbo/Cargo.toml

- name: Run integration tests
run: ./tests/run_tests.sh
Expand All @@ -145,7 +144,7 @@ jobs:
key: ${{ runner.os }}-cargo-overflow-${{ hashFiles('turbo/Cargo.lock') }}

- name: cargo test (overflow-checks enabled)
run: cargo test --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo test --workspace --manifest-path turbo/Cargo.toml
env:
RUSTFLAGS: "-C overflow-checks=on"

Expand All @@ -168,7 +167,7 @@ jobs:
key: ${{ runner.os }}-cargo-build-${{ hashFiles('turbo/Cargo.lock') }}

- name: Build
run: cargo build --release --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo build --release --workspace --manifest-path turbo/Cargo.toml

- name: Report binary size
run: |
Expand All @@ -193,67 +192,6 @@ jobs:
run: bash tests.sh
working-directory: turbo/crates/turbo-codegen-cranelift/runtime

llvm-backend:
name: LLVM backend (build + test)
runs-on: ubuntu-latest
# Hard-required now that struct destructuring, if-let, and optional
# chaining are implemented. The three features were the last TODOs
# gating the fence; see CHANGELOG.md under [Unreleased] for details.
# Only run when LLVM-related files change, or on pushes to master
if: >-
github.event_name == 'push' ||
github.event_name == 'pull_request'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
llvm:
- 'turbo/crates/turbo-codegen-llvm/**'
- 'turbo/crates/turbo-ast/**'
- '.github/workflows/ci.yml'

- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
if: steps.filter.outputs.llvm == 'true' || github.event_name == 'push'

- name: Install LLVM 18
if: steps.filter.outputs.llvm == 'true' || github.event_name == 'push'
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y llvm-18-dev libpolly-18-dev

- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
if: steps.filter.outputs.llvm == 'true' || github.event_name == 'push'
with:
path: |
~/.cargo/registry
~/.cargo/git
turbo/target
key: ${{ runner.os }}-cargo-llvm-${{ hashFiles('turbo/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-llvm-

- name: Build LLVM backend
if: steps.filter.outputs.llvm == 'true' || github.event_name == 'push'
run: cargo build --manifest-path turbo/Cargo.toml -p turbo-codegen-llvm
env:
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18

- name: Test LLVM backend
if: steps.filter.outputs.llvm == 'true' || github.event_name == 'push'
run: cargo test --manifest-path turbo/Cargo.toml -p turbo-codegen-llvm
env:
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18

- name: Skip notice
if: steps.filter.outputs.llvm != 'true' && github.event_name != 'push'
run: echo "No LLVM-related files changed — skipping build and test."

website:
name: Website lint + build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -301,7 +239,7 @@ jobs:
key: ${{ runner.os }}-cargo-parity-${{ hashFiles('turbo/Cargo.lock') }}

- name: Build release
run: cargo build --release --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo build --release --workspace --manifest-path turbo/Cargo.toml

- name: Run parity tests
run: ./tests/parity/run_parity.sh
Expand Down
49 changes: 6 additions & 43 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
run: cargo fmt --manifest-path turbo/Cargo.toml --all -- --check

- name: cargo clippy -D warnings
run: cargo clippy --manifest-path turbo/Cargo.toml --workspace --exclude turbo-codegen-llvm --all-targets -- -D warnings
run: cargo clippy --manifest-path turbo/Cargo.toml --workspace --all-targets -- -D warnings

- name: cargo test
run: cargo test --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo test --workspace --manifest-path turbo/Cargo.toml

- name: Build release for integration + parity
run: cargo build --release --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo build --release --workspace --manifest-path turbo/Cargo.toml

- name: Integration tests
run: ./tests/run_tests.sh
Expand All @@ -50,7 +50,7 @@ jobs:
- name: cargo doc -D warnings
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo doc --no-deps --workspace --manifest-path turbo/Cargo.toml

- uses: taiki-e/install-action@9545a0634ccdca487a09cde61d362f0bc5fb5df9 # v2.61.4
with:
Expand All @@ -74,13 +74,6 @@ jobs:
# in a dashboard nobody watches. Future improvement: add it back
# if/when we want to track soft-fail trends across days (e.g.
# feed the hash diff into a cross-build observability bucket).
#
# `llvm-backend` is *not* omitted: ci.yml path-gates it so PRs
# don't pay the LLVM build cost on unrelated changes, but the
# nightly canary runs on master nightly and exists exactly to
# catch backend rot, so we run it for real (no path filter, no
# continue-on-error). The LLVM toolchain install step matches
# the one in ci.yml exactly.

- name: C runtime tests
run: bash tests.sh
Expand All @@ -89,36 +82,6 @@ jobs:
- name: Lint error codes
run: ./scripts/check_error_codes.sh

- name: Install LLVM 18 (for llvm-backend)
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y llvm-18-dev libpolly-18-dev

# Mirror the LLVM cache step from ci.yml so the nightly canary hits the
# same cache layer as PR builds. Keeping the key and restore-keys in
# lockstep means a cold LLVM 18 build is rare — otherwise this would
# add ~10 minutes to every nightly run.
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
~/.cargo/registry
~/.cargo/git
turbo/target
key: ${{ runner.os }}-cargo-llvm-${{ hashFiles('turbo/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-llvm-

- name: Build LLVM backend
run: cargo build --manifest-path turbo/Cargo.toml -p turbo-codegen-llvm
env:
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18

- name: Test LLVM backend
run: cargo test --manifest-path turbo/Cargo.toml -p turbo-codegen-llvm
env:
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18

- name: Build codegen fuzz binary
run: cargo build --release --bin codegen-fuzz --manifest-path turbo/fuzz/Cargo.toml

Expand All @@ -142,7 +105,7 @@ jobs:
toolchain: stable

- name: Build release binary
run: cargo build --release --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo build --release --workspace --manifest-path turbo/Cargo.toml

- name: Smoke test
run: ./turbo/target/release/turbolang --version
Expand All @@ -161,7 +124,7 @@ jobs:
toolchain: stable

- name: Build release
run: cargo build --release --workspace --exclude turbo-codegen-llvm --manifest-path turbo/Cargo.toml
run: cargo build --release --workspace --manifest-path turbo/Cargo.toml

- name: Package canary
run: |
Expand Down
37 changes: 5 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,12 @@ jobs:
- os: macos-latest
target: aarch64-apple-darwin
artifact: turbolang
llvm: true
llvm_prefix: /opt/homebrew/opt/llvm@18
- os: macos-latest
target: x86_64-apple-darwin
artifact: turbolang
llvm: false
llvm_prefix: ""
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: turbolang
llvm: true
llvm_prefix: /usr/lib/llvm-18

runs-on: ${{ matrix.os }}

Expand All @@ -40,17 +34,6 @@ jobs:
toolchain: stable
targets: ${{ matrix.target }}

- name: Install LLVM 18 (macOS)
if: runner.os == 'macOS' && matrix.llvm
run: brew install llvm@18 zstd

- name: Install LLVM 18 (Linux)
if: runner.os == 'Linux' && matrix.llvm
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y llvm-18-dev libpolly-18-dev

- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
Expand All @@ -62,17 +45,7 @@ jobs:
${{ runner.os }}-cargo-release-${{ matrix.target }}-
${{ runner.os }}-cargo-release-

- name: Build (Cranelift + LLVM)
if: matrix.llvm
run: |
cd turbo
cargo build --release --target ${{ matrix.target }} -p turbo-cli --features turbo-cli/llvm
env:
LLVM_SYS_180_PREFIX: ${{ matrix.llvm_prefix }}
LIBRARY_PATH: ${{ runner.os == 'macOS' && '/opt/homebrew/lib' || '' }}

- name: Build (Cranelift only)
if: "!matrix.llvm"
- name: Build (Cranelift)
run: |
cd turbo
cargo build --release --target ${{ matrix.target }} -p turbo-cli
Expand All @@ -92,11 +65,11 @@ jobs:
echo 'fn main() { print("turbo works") }' > /tmp/test.tb
./turbo/target/${{ matrix.target }}/release/turbolang run /tmp/test.tb

- name: Smoke test - LLVM AOT build
if: matrix.target != 'x86_64-apple-darwin' && matrix.llvm
- name: Smoke test - AOT build
if: matrix.target != 'x86_64-apple-darwin'
run: |
./turbo/target/${{ matrix.target }}/release/turbolang build --llvm /tmp/test.tb -o /tmp/test_llvm
/tmp/test_llvm
./turbo/target/${{ matrix.target }}/release/turbolang build /tmp/test.tb -o /tmp/test_aot
/tmp/test_aot

- name: Package
run: |
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ node_modules/
# Build outputs
turbo_test_build
hello
mock_agent
simple_agent
benchmark-final.png
*.o
*.d
*.wasm
Expand All @@ -32,6 +35,13 @@ docs/superpowers/
/PLAN-*.md
/INDEX.md
/turbo/cow-bug-audit.md
/AUDIT-REPORT.md
/FINDINGS-REPORT.md
/SPRINT-PLAN.md
/SPRINT-PLAN-*.md
/STDLIB-ROADMAP.md
/TODO.md
/turbo/PHASE1-POLISH-SPRINT.md

# OMX tooling artifacts (logs, plans, state — local only, never committed)
/.omx/
Expand Down
48 changes: 0 additions & 48 deletions AUDIT-REPORT.md

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ Format based on [Keep a Changelog](https://keepachangelog.com/).

## [Unreleased]

### Removed
- **The experimental LLVM backend (`turbo-codegen-llvm`, `turbolang build --llvm`).**
Cranelift is now the single code-generation backend. The LLVM path was a
partial second implementation (roughly half the builtins), did not build
cleanly from the documented steps, and offered no measured speedup over
Cranelift — which already edges out `cc -O2` on the fib benchmark. Removing it
eliminates a large duplicated codegen surface and the cost of keeping two
backends at parity. A future optimizing backend, if pursued, should lower
through a shared mid-level IR rather than re-walking the AST a second time.

## [0.9.0] - 2026-05-16 — Batteries-Included Stdlib

Major stdlib expansion: 37 new builtins bringing TurboLang from 67 to 104 built-in functions. Inspired by the batteries-included philosophy — every dependency is liability, the stdlib must be complete enough that developers never need a package manager.
Expand Down
Loading
Loading