Skip to content
Open
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
68 changes: 60 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -790,23 +790,75 @@ jobs:
if-no-files-found: warn

c-backend:
name: C Backend Verification
name: C Backend ${{ matrix.name }}
needs: build
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: Windows x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
- name: macOS ARM64
os: macos-latest
target: aarch64-apple-darwin
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install C compiler
- name: Install Linux C compiler
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y gcc

- name: Run C backend verification
- name: Run C backend acceptance
shell: bash
env:
B4_C_BACKEND_ACCEPTANCE_REPORT: target/b4-c-backend-acceptance-${{ matrix.target }}.tsv
run: scripts/bootstrap/verify_b4_c_backend_acceptance.sh

- name: Run C backend regression verifier
shell: bash
run: python3 host/zap-bootstrap/verify_c_backend.py

- name: Upload C backend verification results
- name: Upload C backend acceptance results
if: always()
uses: actions/upload-artifact@v4
with:
name: zap-c-backend-verification-${{ github.sha }}
path: target/c-backend-verification.tsv
if-no-files-found: warn
name: zap-b4-c-backend-${{ matrix.target }}-${{ github.sha }}
path: |
target/b4-c-backend-acceptance-*.tsv
target/c-backend-verification.tsv
if-no-files-found: error

b4-c-backend-cross-platform:
name: B4 C Backend Cross-Platform Comparison
needs: c-backend
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Download C backend reports
uses: actions/download-artifact@v4
with:
pattern: zap-b4-c-backend-*
path: target/c-backend-reports
merge-multiple: true

- name: Compare emitted C and stdout hashes
env:
B4_C_BACKEND_REPORT_DIR: target/c-backend-reports
B4_C_BACKEND_CROSS_PLATFORM_REPORT: target/b4-c-backend-cross-platform.tsv
run: scripts/bootstrap/verify_b4_c_backend_cross_platform.sh

- name: Upload cross-platform C backend evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: zap-b4-c-backend-cross-platform-${{ github.sha }}
path: target/b4-c-backend-cross-platform.tsv
if-no-files-found: error
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ venv/
build/
native/target/
/target/
/.target/
/tmp/
dist/
bin/
dist/
.pytest_cache/
.DS_Store
**/target/
**/.target/
.env
.env.*
!.env.example
Expand All @@ -20,3 +22,4 @@ dist/
/*.zp
rustup_*.snap
rustup_*.assert
*.obj
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: native native-run native-test host-test legacy-test bootstrap-b1-arbitrary-test bootstrap-b1-full-corpus-test bootstrap-b1-parser-corpus-test bootstrap-non-rust-test bootstrap-driver-contract-test bootstrap-driver-module-test bootstrap-module-ownership-test bootstrap-frontend-ownership-test bootstrap-backend-ownership-test bootstrap-byte-determinism-test bootstrap-second-stage-test bootstrap-three-stage-test bootstrap-clean-env-test bootstrap-self-rebuild-test test package clean
.PHONY: native native-run native-test host-test legacy-test bootstrap-b1-arbitrary-test bootstrap-b1-full-corpus-test bootstrap-b1-parser-corpus-test bootstrap-non-rust-test bootstrap-driver-contract-test bootstrap-driver-module-test bootstrap-module-ownership-test bootstrap-frontend-ownership-test bootstrap-backend-ownership-test bootstrap-byte-determinism-test bootstrap-second-stage-test bootstrap-three-stage-test bootstrap-clean-env-test bootstrap-self-rebuild-test bootstrap-b4-c-backend-test test package clean

native:
cargo build --release --locked --manifest-path native/Cargo.toml
Expand Down Expand Up @@ -81,10 +81,13 @@ bootstrap-clean-env-test:

bootstrap-self-rebuild-test: bootstrap-byte-determinism-test bootstrap-second-stage-test bootstrap-three-stage-test bootstrap-clean-env-test

bootstrap-b4-c-backend-test:
bash scripts/bootstrap/verify_b4_c_backend_acceptance.sh

legacy-test:
cd legacy && python3 -m unittest -v test_zap.py

test: legacy-test native-test host-test bootstrap-test bootstrap-b1-test bootstrap-b1-arbitrary-test bootstrap-b1-full-corpus-test bootstrap-b1-parser-corpus-test bootstrap-b3-test bootstrap-vm-test bootstrap-clean-repo-test bootstrap-refactor-smoke-test bootstrap-non-rust-test bootstrap-driver-contract-test bootstrap-driver-module-test bootstrap-module-ownership-test bootstrap-frontend-ownership-test bootstrap-backend-ownership-test bootstrap-self-rebuild-test
test: legacy-test native-test host-test bootstrap-test bootstrap-b1-test bootstrap-b1-arbitrary-test bootstrap-b1-full-corpus-test bootstrap-b1-parser-corpus-test bootstrap-b3-test bootstrap-vm-test bootstrap-clean-repo-test bootstrap-refactor-smoke-test bootstrap-non-rust-test bootstrap-driver-contract-test bootstrap-driver-module-test bootstrap-module-ownership-test bootstrap-frontend-ownership-test bootstrap-backend-ownership-test bootstrap-self-rebuild-test bootstrap-b4-c-backend-test

package: native
./package_release.sh x86_64-unknown-linux-gnu
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Zap is distributed as a native executable. After Zap is installed, a project can
| Lockfile | `zap.lock` |
| Runtime | Standalone native executable |
| Platforms | Linux x86_64, Windows x86_64, macOS ARM64 |
| Bootstrap stage | **B4 candidate** — verification infrastructure complete; Zap-produced Rust-free seed binary not yet available |
| Bootstrap stage | **B4 candidate** — Rust-free C backend acceptance implemented; three-platform evidence and production compiler migration pending (Schema v2) |
| Reference implementation | Rust native CLI/runtime remains the owner of complete semantics |
| License | MIT |
| Repository | [github.com/hidecard/zap](https://github.com/hidecard/zap) |
Expand Down Expand Up @@ -186,7 +186,7 @@ The current stable direction covers the `.zp` language core, native CLI, project

Zap is at bootstrap stage **B4 candidate**. The Zap lexer/parser/type-checker/typed-IR work currently documented under `bootstrap/` is **provisional and corpus-limited**: it provides differential evidence for selected fixtures, while the Rust native implementation remains the reference owner. The B2 function fixtures cover one annotated function, return propagation, a compatible numeric call, and a stable incompatible-call diagnostic; they do not establish a general self-hosted compiler.

The repository has extensive B4 verification infrastructure: 18-row acceptance manifest, cross-platform CI jobs (`b4-platform-evidence`), full acceptance matrix gate, artifact manifest gate, and evidence collection. B4 remains **not-certified** because no mechanism exists to produce the native binary without Rust/Cargo. The remaining blockers are documented in `docs/SEED_PRODUCTION_PLAN.md`.
The repository has extensive B4 verification infrastructure: a 19-row Schema v2 acceptance manifest, executable C backend fixtures, a three-platform CI matrix with emitted-C/stdout hash aggregation, a full acceptance matrix gate, artifact manifest checks, and evidence collection. B4 remains **not-certified**: B4-FULL-013..018 pass locally through the Rust-free Python-to-C backend path, while the Linux/Windows/macOS matrix for this revision and the migration of the reference Python lowering path into the Zap-owned B1..B4 production pipeline remain pending. The boundary and next steps are documented in `docs/SEED_PRODUCTION_PLAN.md`, `docs/B4_CONTRACT_REVISION_V2_EN.md`, and `bootstrap/evidence/b4/certification_evidence.md`.

Complete type inference, arbitrary-program parser and diagnostic parity, general typed-IR production, package/build ownership, VM execution ownership, and platform-seed acceptance remain future roadmap work. Do not interpret the current candidates as fully Zap-only or B4/self-hosted. The detailed boundary is maintained in the [Bootstrap Contract](docs/BOOTSTRAP_CONTRACT_EN.md), and broader product scope is tracked in the [language specification](docs/LANGUAGE_SPEC_EN.md), contracts, tests, and release notes.

Expand Down
8 changes: 4 additions & 4 deletions README_MM.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Zap သည် native executable အဖြစ် ဖြန့်ချိထာ
| Lockfile | `zap.lock` |
| Runtime | Standalone native executable |
| Platforms | Linux x86_64၊ Windows x86_64၊ macOS ARM64 |
| Bootstrap stage | **B4 candidate** — verification infrastructure ပြီးပြီး; Zap-produced Rust-free seed binary လက်ရှိတွင် မရှိသေးပါ |
| Bootstrap stage | **B4 candidate** — Rust-free C backend acceptance implement လုပ်ပြီး; three-platform evidence နှင့် production compiler migration ကျန်နေသေးသည် (Schema v2) |
| Reference implementation | Complete semantics အတွက် Rust native CLI/runtime က reference owner အဖြစ် ဆက်ရှိသည် |
| License | MIT |
| Repository | [github.com/hidecard/zap](https://github.com/hidecard/zap) |
Expand Down Expand Up @@ -169,7 +169,7 @@ React၊ Vue၊ Svelte သို့မဟုတ် အခြား frontend proj

Zap သည် **B4 candidate** အဆင့်တွင်ပင် ရှိနေပါသည်။ `bootstrap/` အောက်ရှိ Zap lexer/parser/type-checker/typed-IR အလုပ်များသည် **provisional နှင့် corpus-limited** သာဖြစ်ပြီး fixture အချို့အတွက် differential evidence ပေးခြင်းသာ ဖြစ်ပါသည်။ Complete semantics အတွက် Rust native implementation က reference owner အဖြစ် ဆက်ရှိသည်။ B2 function fixture များသည် annotated function တစ်ခု၊ return propagation၊ compatible numeric call နှင့် stable incompatible-call diagnostic တို့ကိုသာ cover လုပ်ပြီး general self-hosted compiler ဖြစ်ကြောင်း မသက်သေပြပါ။

Complete type inference၊ arbitrary-program parser/diagnostic parity၊ general typed-IR production၊ package/build ownership၊ VM execution ownership နှင့် platform-seed acceptance တို့သည် roadmap တွင် ဆက်လက်လုပ်ဆောင်ရန် ကျန်ရှိပါသည်။ Repository တွင် extensive B4 verification infrastructure ရှိပါသည်။ 18-row acceptance manifest၊ cross-platform CI jobs (`b4-platform-evidence`)၊ full acceptance matrix gate၊ artifact manifest gate နှင့် evidence collection များ ပြုလုပ်ပြီးဖြစ်ပါသည်။ B4 သည် **not-certified** အဖြစ် ဆက်ရှိပါသည်။ `cargo`၊ `rustc` သို့မဟုတ် `rustup` မသုံးဘဲ native binary ဖန်တီးရာမှာ mechanism မရှိသေးပါ။ ကျန်တဲ့ blockers များကို `docs/SEED_PRODUCTION_PLAN.md` တွင် မှတ်တမ်းတင်ထားပါသည်။ လက်ရှိ candidate များကို fully Zap-only သို့မဟုတ် B4/self-hosted ဟု မယူဆရ။ အသေးစိတ် boundary ကို [Bootstrap Contract](docs/BOOTSTRAP_CONTRACT_MM.md) တွင် ထိန်းသိမ်းထားပြီး product scope ကို [language specification](docs/LANGUAGE_SPEC_MM.md)၊ contract၊ test နှင့် release note များတွင် ဖော်ပြထားပါသည်
Repository တွင် extensive B4 verification infrastructure ရှိပါသည်။ 19-row Schema v2 acceptance manifest၊ executable C backend fixtures၊ Linux/Windows/macOS CI matrix နှင့် emitted-C/stdout hash aggregation၊ full acceptance matrix gate၊ artifact manifest gate နှင့် evidence collection များ ပါဝင်ပါသည်။ B4 သည် **not-certified** အဖြစ် ဆက်ရှိပါသည်။ B4-FULL-013..018 သည် Rust-free Python-to-C backend path ဖြင့် local အနေနဲ့ 6/6 pass ဖြစ်သော်လည်း ဤ revision အတွက် Linux/Windows/macOS matrix နှင့် reference Python lowering path ကို Zap-owned B1..B4 production pipeline သို့ ပြောင်းရန် ကျန်နေသေးသည်။ Boundary နှင့် next steps များကို `docs/SEED_PRODUCTION_PLAN.md`၊ `docs/B4_CONTRACT_REVISION_V2_EN.md` နှင့် `bootstrap/evidence/b4/certification_evidence.md` တွင် မှတ်တမ်းတင်ထားပါသည်

Complete ORM၊ provider-neutral production migration platform၊ user-defined trait syntax၊ production async I/O reactor၊ cross-file semantic rename၊ template compiler နှင့် hidden app registry တို့ကို complete ဟု မဆိုထားသေးပါ။

Expand All @@ -192,5 +192,5 @@ Local validation မစတင်မီ `make doctor` ကို run လုပ်
## License

Zap ကို [MIT License](LICENSE) အောက်တွင် ဖြန့်ချိထားပါသည်။


Loading