maekawatoshiki / Sericum
Licence: mit
(Toy) Compiler Infrastructure influenced by LLVM written in Rust
Stars: ✭ 366
Programming Languages
rust
11053 projects
Projects that are alternatives of or similar to Sericum
Jitfromscratch
Example project from my talks in the LLVM Social Berlin and C++ User Group
Stars: ✭ 158 (-56.83%)
Mutual labels: compiler, llvm
Compile To Web
Discover what languages can be compiled to Web Assembly
Stars: ✭ 164 (-55.19%)
Mutual labels: compiler, llvm
Soll
SOLL is a new compiler for generate Ewasm from solidity and yul. See a demo here: https://asciinema.org/a/ezJqNLicn5fya02zwu4VXIo8a
Stars: ✭ 329 (-10.11%)
Mutual labels: compiler, llvm
Staticscript
🎉🎉🎉 A new statically typed programming language, syntactically like TypeScript.
Stars: ✭ 337 (-7.92%)
Mutual labels: compiler, llvm
Llvm Guide Zh
User Guides For those new to the LLVM system.(LLVM系统的新用户指南,中文翻译版)
Stars: ✭ 180 (-50.82%)
Mutual labels: compiler, llvm
Llvm
[MERGED UPSTREAM] AVR backend for the LLVM compiler library
Stars: ✭ 222 (-39.34%)
Mutual labels: compiler, llvm
Speedy.js
Accelerate JavaScript Applications by Compiling to WebAssembly
Stars: ✭ 300 (-18.03%)
Mutual labels: compiler, llvm
Flax
general purpose programming language, in the vein of C++
Stars: ✭ 111 (-69.67%)
Mutual labels: compiler, llvm
Rhine
🔬 a C++ compiler middle-end, using an LLVM backend
Stars: ✭ 157 (-57.1%)
Mutual labels: compiler, llvm
Brain
An esoteric programming language compiler on top of LLVM based on Brainfuck
Stars: ✭ 112 (-69.4%)
Mutual labels: compiler, llvm
Play with llvm
A book about LLVM & Clang(中文开源书:玩转 LLVM)
Stars: ✭ 175 (-52.19%)
Mutual labels: compiler, llvm
Numba Scipy
numba_scipy extends Numba to make it aware of SciPy
Stars: ✭ 98 (-73.22%)
Mutual labels: compiler, llvm
Faust
Functional programming language for signal processing and sound synthesis
Stars: ✭ 1,360 (+271.58%)
Mutual labels: compiler, llvm
Nxdk
The cross-platform, open-source SDK to develop for original Xbox: *new* xdk
Stars: ✭ 200 (-45.36%)
Mutual labels: compiler, llvm
Deepc
vendor independent deep learning library, compiler and inference framework microcomputers and micro-controllers
Stars: ✭ 260 (-28.96%)
Mutual labels: compiler, llvm
Sericum
Compiler Infrastructure influenced by LLVM written in Rust
Do not expect too much stuff!
To Do
- [ ] Implement basic block parameters
- [ ] Make it possible to generate code for multiple targets without rebuilding sericum itself
- [ ] Verify IR
- [ ] More optimizations for IR
- [ ] Support returning struct as value
- [ ] Write documents
Build
Requirement: Rust nightly
cargo test --features x86_64 # build for x86_64
cargo test brainfuxk --features x86_64 --release -- --nocapture # this is fun. just try it.
cargo test --features aarch64 # build for aarch64. a few features are implemented.
cargo test --features riscv64 # currently doesn't work. need help.
Example
cargo test demo --features $ARCH -- --nocapture # $ARCH is x86_64 or aarch64
- Useful macro is available to describe IR
let fibo = sericum_ir!(m; define [i32] f [(i32)] {
entry:
cond = icmp le (%arg.0), (i32 2);
br (%cond) l1, l2;
l1:
ret (i32 1);
l2:
a1 = sub (%arg.0), (i32 1);
r1 = call f [(%a1)];
a2 = sub (%arg.0), (i32 2);
r2 = call f [(%a2)];
r3 = add (%r1), (%r2);
ret (%r3);
});
Make your own language using sericum as backend
./minilang
and ./sericumcc
may help you.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].