You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: point at git-bug; drop Haxe, test-pass counts and dependent types
Haxe is no longer a target, so its integration guides go and examples use
MyLang, ZynML, Python or Lua. CI badges carry test status, so no document
repeats pass counts. The unreached dependent-types checker is not advertised.
**ZBC (Zyntax ByteCode)**is a portable, architecture-independent bytecode format designed for efficient serialization and distribution of compiled programs.
101
+
A **ZBC (Zyntax ByteCode)**file (`.zbc`) holds one HIR module: a 44-byte header (magic, format version 3.0, payload encoding, CRC-32 of the payload) followed by the module in one of four encodings:
103
102
104
-
### Key Features
105
-
106
-
-**Portable**: Architecture-independent binary format
107
-
-**Compact**: Efficient binary encoding with compression
108
-
-**Type-Preserving**: Maintains full type information for verification
109
-
-**Module-Based**: Supports separate compilation and linking
110
-
-**Version-Safe**: Built-in format versioning for compatibility
111
-
112
-
### Format Overview
113
-
114
-
```text
115
-
┌─────────────────────────────────────┐
116
-
│ ZBC File Header │
117
-
│ - Magic number: 0x5A42_4300 │
118
-
│ - Version: 1.0 │
119
-
│ - Metadata section offset │
120
-
└─────────────────────────────────────┘
121
-
┌─────────────────────────────────────┐
122
-
│ Type Definitions │
123
-
│ - Structs, enums, traits │
124
-
│ - Generic type parameters │
125
-
└─────────────────────────────────────┘
126
-
┌─────────────────────────────────────┐
127
-
│ Function Definitions │
128
-
│ - Signature with parameter types │
129
-
│ - HIR instruction stream │
130
-
│ - SSA value numbering │
131
-
└─────────────────────────────────────┘
132
-
┌─────────────────────────────────────┐
133
-
│ Constant Pool │
134
-
│ - String literals │
135
-
│ - Numeric constants │
136
-
└─────────────────────────────────────┘
137
-
```
103
+
-**Postcard**: compact binary; what ZPack archives and HIR caches write
104
+
-**JSON**: readable, for debugging
105
+
-**Bincode**: fixed-width binary
106
+
-**Split**: Postcard with each function encoded on its own, so a reader decodes only the functions it reaches; used by language snapshots
138
107
139
-
### Use Cases
108
+
A reader accepts a file only when its major version matches the reader's and its checksum is intact. The payload is the serde encoding of the HIR types in `crates/compiler/src/hir.rs`, so only a build with the same HIR declarations as the writer's can read a file.
140
109
141
-
1.**Distribution**: Ship pre-compiled modules to users
142
-
2.**Caching**: Cache compiled TypedAST for faster rebuilds
143
-
3.**Cross-Platform**: Compile once, run on any Zyntax-supported platform
144
-
4.**Integration**: Load modules from multiple source languages
110
+
`zyntax compile program.zbc` compiles a module from a file; ZPack archives carry modules as `modules/<path>.zbc`.
145
111
146
-
See [Bytecode Format Specification](./docs/BYTECODE_FORMAT_SPEC.md) for complete details.
112
+
See the [Bytecode Format Specification](./docs/BYTECODE_FORMAT_SPEC.md) for the byte layout, the encodings and the version history.
147
113
148
114
---
149
115
@@ -168,7 +134,7 @@ See [Bytecode Format Specification](./docs/BYTECODE_FORMAT_SPEC.md) for complete
168
134
Zyn grammars define both syntax (what patterns to match) and semantics (what AST nodes to create). This enables:
169
135
170
136
-**Custom Language Frontends**: Define your own language syntax and compile to native code
171
-
-**Runtime Grammar Loading**: No Rust recompilation needed—load grammars dynamically
137
+
-**Runtime Grammar Loading**: No Rust recompilation needed; load grammars dynamically
172
138
-**Seamless Integration**: Output TypedAST that flows through Zyntax's HIR and backend pipeline
173
139
-**Interactive Development**: Test grammar changes instantly with the built-in REPL
- ✅ Switch expression pattern matching in LLVM backend
643
-
- 🔄 Haxe-style exception handling (throw/catch/finally with stack unwinding)
644
-
- 🔄 Complete I/O and networking standard library
645
-
- 🔄 String operations (needs stdlib integration via plugin system)
646
-
647
-
### Q2 2026: Ecosystem & Integration
648
-
649
-
- 🔄 Complete Reflaxe/Haxe integration
650
-
- 🔄 Run Haxe standard library through Zyntax
651
-
- 🔄 Performance benchmarking vs existing targets
652
-
- 🔄 100% test pass rate
653
-
654
-
### Q3 2026: Developer Experience
655
-
656
-
- 🔄 Language Server Protocol (LSP) implementation
657
-
- 🔄 Package manager
658
-
- 🔄 Comprehensive documentation and tutorials
659
-
- 🔄 VSCode/IntelliJ integration
660
-
661
-
---
662
-
663
557
## 🤝 Contributing
664
558
665
559
Contributions are welcome! Here's how to get started:
666
560
667
-
1.**Pick a task** from [BACKLOG.md](BACKLOG.md)
561
+
Issues are tracked with [git-bug](https://github.com/git-bug/git-bug) and live in the repository under `refs/bugs/*`. Run `git-bug pull` to fetch them, then `git-bug bug --status open` to list open work; filter with `--label bug`, `--label perf` or an area such as `--label area:compiler`, and read one with `git-bug bug show <id>`.
562
+
563
+
1.**Pick an open issue** with `git-bug bug --status open`
668
564
2.**Check documentation** in [docs/](docs/)
669
565
3.**Run tests** to understand the system: `cargo test`
670
566
4.**Implement incrementally** with test coverage
@@ -673,11 +569,11 @@ Contributions are welcome! Here's how to get started:
673
569
### Development Setup
674
570
675
571
```bash
676
-
# Install Rust (1.70+)
572
+
# Install Rust (1.85+)
677
573
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
0 commit comments