正在自动登录…
← 返回项目列表tek-sys-hub/
tek-sys-hub/ Rubix-lang
Rubix 是一门完全用 x86-64 汇编编写的系统编程语言,其编译器不依赖任何外部运行时库,可将 .ix 源码编译为直接运行于 Linux、Windows、macOS 的原生可执行文件,适合系统级编程与教学研究。
AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/22 13:56:55 · 查看原文
- 累计 Stars
- 1,897
- 当前热度
- 1~7 天 · 热门
- 仓库创建时间
选用指南
AI 根据 README 整理 · 2026/10/22 13:56:55
- 适用场景
适合对汇编级编译原理、零依赖原生执行和跨平台系统编程感兴趣的用户,以及需要性能极致的嵌入式或低级代码场景。
查看 README 依据
<br clear="left"/> --- ## ⚡ Highlights - **Pure Assembly Compiler**: The compiler itself is written completely in GNU x86-64 assembly (`as` + `ld`). No external dependencies or runtime libraries are needed. - **Tiny & Instant**: The compiler binary is only **~42 KB**, with sub-millisecond compilation times. - **Zero OS Barrier (Universal Multi-OS Architecture)**: - Compiles `.ix` code into standalone native executables equipped with an adaptive runtime.
- **No WASM, No Virtual Machine**: Architected to execute directly on bare silicon across **Linux, Windows, and macOS** (verified on Linux x86-64). - **Dynamic Host OS Detection**: Automatically determines the host OS at binary entry (`rubix_host_os`). - **In-Memory Windows Resolver**: Walks the Windows PEB (`gs:[0x60]`) in pure assembly to resolve `kernel32.dll` API exports without external import tables. - **Rich Language Features**: - `for` and `while` loops with `break`, `continue`, and arbitrary nesting
- 使用方式
通过 make 构建编译器,使用 ./rubixc 驱动编译和运行 .ix 程序,也支持命令行参数指定目标平台或调试信息;提供 test.sh 验证。
查看 README 依据
### 5. Separate Compilation & Static Object Linking Compile individual `.ix` files into ELF relocatable objects (`.o`) and link multiple units: ```bash ./rubixc -c module1.ix -o module1.o ./rubixc -c module2.ix -o module2.o ./rubixc module1.o module2.o -o my_app ``` --- ## 🛠️ Rich Diagnostic Error Reporting Rubix produces clear, informative compile-time diagnostics pointing directly to the offending token: ``` Rubix Compiler Error: Expected expression --> line 4 | 4 | let x = ; | ^ ``` --- ## 🚀 Quickstart & Usage ### Prerequisites - Linux OS (x86-64)
- GNU Assembler (`as`) and Linker (`ld`) (available via standard `binutils`) ### 1. Build the Compiler ```bash make clean && make ``` Produces `rubix_compiler` and `lib/runtime.o`. ### 2. Compile and Run a Program Use the `./rubixc` compiler driver: ```bash # Compile and immediately run ./rubixc -r examples/15_floats.ix ./rubixc -r examples/16_structs.ix ./rubixc -r examples/17_native_floats.ix # Compile for Windows PE64 ./rubixc -t windows examples/01_hello.ix -o hello.exe # Compile with DWARF debug info ./rubixc -g examples/01_hello.ix -o hello_dbg ``` ### 3. Run the Entire Test Suite
```bash ./test.sh ``` Executes all **18** test suites verifying the compiler build, arithmetic, control flow, functions, prime algorithms, dynamic arrays, modules, loops, standard library, floats, structs, native float SSE2 operators, Windows cross-linking, and separate compilation. --- ## 📜 License Created with precision in pure x86-64 Assembly. Free and open source.
- 部署要求
需要 Linux x86-64 操作系统,以及 GNU Assembler (as) 和 Linker (ld)。
查看 README 依据
### 5. Separate Compilation & Static Object Linking Compile individual `.ix` files into ELF relocatable objects (`.o`) and link multiple units: ```bash ./rubixc -c module1.ix -o module1.o ./rubixc -c module2.ix -o module2.o ./rubixc module1.o module2.o -o my_app ``` --- ## 🛠️ Rich Diagnostic Error Reporting Rubix produces clear, informative compile-time diagnostics pointing directly to the offending token: ``` Rubix Compiler Error: Expected expression --> line 4 | 4 | let x = ; | ^ ``` --- ## 🚀 Quickstart & Usage ### Prerequisites - Linux OS (x86-64)
README
正在加载 README…
收录信息
- 仓库创建时间
- 2026/10/19 13:34:37
- 首次达标收录
- 2026/10/22 13:51:40
- 统计更新时间
- 2026/10/22 19:25:30
按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。
仓库信息
- 最近推送
- 2026/10/22 18:55:49
- 许可证标识
- MIT
- Fork 数
- 1
- 当前状态
- 未归档
收录记录
按创建时长与累计 Stars 首次收录:热门
首次发现项目