Skip to content

Commit af83f17

Browse files
hyperpolymathclaude
andcommitted
refactor: remove old top-level ada/rust/zig dirs, add GPR project file
Completes the restructure: old top-level directories removed (code now lives in src/), GPR project file at root for GNAT/SPARK builds, updated Justfile with real build recipes, minor SPARK spec fixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 241f148 commit af83f17

15 files changed

Lines changed: 103 additions & 723 deletions

.gitignore

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,22 @@ __pycache__/
5050
*.ali
5151
/obj/
5252
/bin/
53-
/ada/obj/
54-
/ada/bin/
53+
/lib/
54+
/proof/
5555

56-
# Zig
56+
# Zig (new layout under src/interface/ffi/)
5757
/zig-cache/
5858
/zig-out/
59-
/zig/zig-cache/
60-
/zig/zig-out/
59+
/src/interface/ffi/zig-cache/
60+
/src/interface/ffi/zig-out/
6161

62-
# Rust workspace
63-
/rust/target/
62+
# Rust (new layout under src/rust/)
63+
/src/rust/target/
64+
/src/rust/Cargo.lock
65+
66+
# Idris2 build artifacts
67+
/build/
68+
/src/interface/abi/build/
6469

6570
# Haskell
6671
/.stack-work/

Justfile

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,71 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
# justfile - Just recipes for this project
2+
# justfile -- Build recipes for RAZE-TUI (5-language polyglot TUI)
33
# See: https://github.com/hyperpolymath/mustfile
44

5-
# Default recipe
5+
# Default recipe: show available commands.
66
default:
77
@just --list
88

9-
# Build the project
10-
build:
11-
@echo "Build not configured yet"
9+
# Build the SPARK core and Ada presentation layer.
10+
build-ada:
11+
gprbuild -P raze_tui.gpr -XMODE=debug -j0
1212

13-
# Run tests
14-
test:
15-
@echo "Tests not configured yet"
13+
# Build the SPARK core in release mode.
14+
build-ada-release:
15+
gprbuild -P raze_tui.gpr -XMODE=release -j0
1616

17-
# Format code
17+
# Build the Zig FFI bridge (links against SPARK exports).
18+
build-zig:
19+
cd src/interface/ffi && zig build
20+
21+
# Build the Rust consumer.
22+
build-rust:
23+
cd src/rust && cargo build
24+
25+
# Build everything (SPARK + Zig + Rust).
26+
build: build-ada build-zig build-rust
27+
28+
# Type-check the Idris2 ABI specifications.
29+
check-abi:
30+
idris2 --check src/interface/abi/State.idr
31+
idris2 --check src/interface/abi/Events.idr
32+
idris2 --check src/interface/abi/Widgets.idr
33+
34+
# Run GNATprove on SPARK packages.
35+
prove:
36+
gnatprove -P raze_tui.gpr -XMODE=spark --level=2 -j0
37+
38+
# Run Zig bridge tests.
39+
test-zig:
40+
cd src/interface/ffi && zig build test
41+
42+
# Run Rust tests.
43+
test-rust:
44+
cd src/rust && cargo test
45+
46+
# Run all tests.
47+
test: test-zig test-rust
48+
49+
# Format code (Rust only; Ada/Zig use editorconfig).
1850
fmt:
19-
@echo "Formatting not configured yet"
51+
cd src/rust && cargo fmt
2052

21-
# Lint code
53+
# Lint Rust code.
2254
lint:
23-
@echo "Linting not configured yet"
55+
cd src/rust && cargo clippy -- -D warnings
2456

25-
# Clean build artifacts
57+
# Clean all build artifacts.
2658
clean:
27-
@echo "Clean not configured yet"
59+
rm -rf obj/ bin/ lib/ proof/
60+
rm -rf src/interface/ffi/zig-cache src/interface/ffi/zig-out
61+
cd src/rust && cargo clean 2>/dev/null || true
62+
rm -rf src/interface/abi/build/
63+
64+
# Run the TUI demo.
65+
run: build-ada
66+
./bin/raze_tui_main
2867

29-
# [AUTO-GENERATED] Multi-arch / RISC-V target
68+
# [AUTO-GENERATED] Multi-arch / RISC-V target.
3069
build-riscv:
31-
@echo "Building for RISC-V..."
32-
cross build --target riscv64gc-unknown-linux-gnu
70+
@echo "Building for RISC-V..."
71+
cd src/rust && cross build --target riscv64gc-unknown-linux-gnu

ada/src/raze-tui.adb

Lines changed: 0 additions & 105 deletions
This file was deleted.

ada/src/raze-tui.ads

Lines changed: 0 additions & 69 deletions
This file was deleted.

ada/src/raze.ads

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)