Skip to content

Commit 1f2c2e7

Browse files
authored
Merge pull request #65 from upstat-io/dev
feat: collect-to-set runtime, rewrite docs to lead with ARC memory model
2 parents 84deb75 + bc8c5e0 commit 1f2c2e7

32 files changed

Lines changed: 625 additions & 270 deletions

File tree

.cargo/config.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ stv = "run -p oric --bin ori -- test --verbose"
1414
# Run Ori tests with filter (usage: cargo stf map)
1515
stf = "run -p oric --bin ori -- test --filter"
1616

17-
# Run all Rust unit tests across the workspace
18-
t = "test --workspace"
17+
# Run all Rust unit tests across the workspace (excludes ori_llvm — needs LLVM 17)
18+
t = "test --workspace --exclude ori_llvm"
1919

2020
# Run Rust tests with output shown
21-
tv = "test --workspace -- --nocapture"
21+
tv = "test --workspace --exclude ori_llvm -- --nocapture"
2222

2323
# Run tests for a specific crate (usage: cargo tc ori_parse)
2424
tc = "test -p"
2525

26-
# Check all crates
27-
c = "check --workspace"
26+
# Check all crates (excludes ori_llvm — needs LLVM 17)
27+
c = "check --workspace --exclude ori_llvm"
2828

29-
# Build all crates
30-
b = "build --workspace"
29+
# Build all crates (excludes ori_llvm — needs LLVM 17)
30+
b = "build --workspace --exclude ori_llvm"
3131

32-
# Clippy on all crates (lint levels defined in workspace Cargo.toml)
33-
cl = "clippy --workspace --all-targets -- -D warnings"
32+
# Clippy on all crates (excludes ori_llvm — needs LLVM 17; use `cargo cll` for LLVM)
33+
cl = "clippy --workspace --exclude ori_llvm --all-targets -- -D warnings"
3434

3535
# LLVM crates (ori_llvm, ori_rt) are excluded from workspace.
3636
# LLVM 17 path is configured via LLVM_SYS_170_PREFIX above.
@@ -44,5 +44,5 @@ blr = "build -p oric -p ori_rt --features llvm --release"
4444
# Run oric with LLVM feature
4545
rl = "run -p oric --features llvm --bin ori --"
4646

47-
# Clippy on LLVM crates (excluded from workspace, use --manifest-path)
48-
cll = "clippy --manifest-path compiler/ori_llvm/Cargo.toml --all-targets -- -D warnings"
47+
# Clippy on LLVM crate
48+
cll = "clippy -p ori_llvm --all-targets -- -D warnings"

.github/workflows/ci.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
with:
3939
components: rustfmt
4040
- run: cargo fmt --all -- --check
41-
- run: cargo fmt --manifest-path compiler/ori_llvm/Cargo.toml -- --check
4241

4342
clippy:
4443
name: Clippy
@@ -53,7 +52,7 @@ jobs:
5352
- uses: Swatinem/rust-cache@v2
5453
with:
5554
key: clippy
56-
- run: cargo clippy --workspace --all-targets -- -D warnings
55+
- run: cargo clippy --workspace --exclude ori_llvm --all-targets -- -D warnings
5756

5857
# Main test suite
5958
test:
@@ -69,14 +68,14 @@ jobs:
6968
key: test
7069

7170
- name: Build
72-
run: cargo build --workspace
71+
run: cargo build --workspace --exclude ori_llvm
7372

7473
- name: Rust unit tests
7574
id: rust-tests
7675
continue-on-error: true
7776
run: |
7877
set -o pipefail
79-
cargo test --workspace 2>&1 | tee rust-test-output.txt
78+
cargo test --workspace --exclude ori_llvm 2>&1 | tee rust-test-output.txt
8079
# Sum all "X passed" counts from "test result:" lines
8180
RUST_TESTS=$(grep -oE '[0-9]+ passed' rust-test-output.txt | grep -oE '^[0-9]+' | awk '{sum+=$1} END {print sum+0}')
8281
RUST_FAILED=$(grep -oE '[0-9]+ failed' rust-test-output.txt | grep -oE '^[0-9]+' | awk '{sum+=$1} END {print sum+0}')
@@ -100,7 +99,7 @@ jobs:
10099
continue-on-error: true
101100
run: |
102101
set -o pipefail
103-
cargo test --manifest-path compiler/ori_rt/Cargo.toml 2>&1 | tee rt-test-output.txt
102+
cargo test -p ori_rt 2>&1 | tee rt-test-output.txt
104103
RT_TESTS=$(grep -oE '[0-9]+ passed' rt-test-output.txt | grep -oE '^[0-9]+' | awk '{sum+=$1} END {print sum+0}')
105104
RT_FAILED=$(grep -oE '[0-9]+ failed' rt-test-output.txt | grep -oE '^[0-9]+' | awk '{sum+=$1} END {print sum+0}')
106105
RT_SKIPPED=$(grep -oE '[0-9]+ ignored' rt-test-output.txt | grep -oE '^[0-9]+' | awk '{sum+=$1} END {print sum+0}')
@@ -177,10 +176,10 @@ jobs:
177176
key: ${{ matrix.os }}
178177

179178
- name: Build
180-
run: cargo build --workspace
179+
run: cargo build --workspace --exclude ori_llvm
181180

182181
- name: Rust unit tests
183-
run: cargo test --workspace
182+
run: cargo test --workspace --exclude ori_llvm
184183

185184
- name: Ori language tests
186185
run: cargo run -p oric --bin ori -- test tests/
@@ -212,7 +211,7 @@ jobs:
212211
key: llvm
213212

214213
- name: LLVM clippy
215-
run: cargo clippy --manifest-path compiler/ori_llvm/Cargo.toml --all-targets -- -D warnings
214+
run: cargo clippy -p ori_llvm --all-targets -- -D warnings
216215
env:
217216
LLVM_SYS_170_PREFIX: /usr/lib/llvm-17
218217

@@ -222,8 +221,8 @@ jobs:
222221
run: |
223222
set -o pipefail
224223
cargo build -p oric -p ori_rt --features llvm -q
225-
cargo test --manifest-path compiler/ori_rt/Cargo.toml 2>&1 | tee rt-llvm-output.txt
226-
cargo test --manifest-path compiler/ori_llvm/Cargo.toml 2>&1 | tee llvm-test-output.txt
224+
cargo test -p ori_rt 2>&1 | tee rt-llvm-output.txt
225+
cargo test -p ori_llvm 2>&1 | tee llvm-test-output.txt
227226
# Sum all "X passed" counts from test output
228227
LLVM_TESTS=$(cat rt-llvm-output.txt llvm-test-output.txt | grep -oE '[0-9]+ passed' | grep -oE '^[0-9]+' | awk '{sum+=$1} END {print sum+0}')
229228
LLVM_FAILED=$(cat rt-llvm-output.txt llvm-test-output.txt | grep -oE '[0-9]+ failed' | grep -oE '^[0-9]+' | awk '{sum+=$1} END {print sum+0}')

Cargo.lock

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

Cargo.toml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,31 @@ members = [
1515
"compiler/ori_compiler",
1616
"compiler/ori_stack",
1717
"compiler/oric",
18+
"compiler/ori_llvm",
19+
"compiler/ori_rt",
20+
]
21+
# Default members exclude LLVM crates (require LLVM 17 system libraries).
22+
# Bare `cargo check`/`cargo test` skip them; use `-p ori_llvm` or `cargo bl` explicitly.
23+
default-members = [
24+
"compiler/ori_ir",
25+
"compiler/ori_diagnostic",
26+
"compiler/ori_lexer_core",
27+
"compiler/ori_lexer",
28+
"compiler/ori_types",
29+
"compiler/ori_parse",
30+
"compiler/ori_patterns",
31+
"compiler/ori_eval",
32+
"compiler/ori_fmt",
33+
"compiler/ori_arc",
34+
"compiler/ori_canon",
35+
"compiler/ori_compiler",
36+
"compiler/ori_stack",
37+
"compiler/oric",
38+
"compiler/ori_rt",
1839
]
19-
# Excluded crates (still buildable with -p flag, but not part of --workspace):
20-
# - ori_llvm: Requires LLVM 17; build with: cargo bl / cargo blr
21-
# - ori_rt: Runtime for AOT; built alongside ori_llvm
40+
# Excluded crates (not part of workspace at all):
2241
# - ori-lsp: Not yet updated to use new compiler
2342
exclude = [
24-
"compiler/ori_llvm",
25-
"compiler/ori_rt",
2643
"tools/ori-lsp",
2744
]
2845

0 commit comments

Comments
 (0)