- Notifications
You must be signed in to change notification settings - Fork2
A quick programming language with a compiler implemented in Rust.
License
RedstoneWizard08/QuickScript
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
QuickScript is a language that I am creating to learn how to, well, create a language.The syntax is very similar to Rust, and it is a semicolon-based language, or at least it will be (I think). The compiler is written in Rust, and uses Cranelift as a backend, with AOT and JIT modes supported, and allows anylibc
function to be called in code. The standard library is pretty nonexistent right now, but it'll get better in the future.
This can also serve as a way to learn how to create your own language with Rust.
This project is licensed under the MIT license. Feel free to use the code for whatever you want.
Installing QuickScript is incredibly easy!Here's how you can do it:
With Cargo:
cargo install quickscript
Via GitHub Releases:
- Head tohttps://github.com/RedstoneWizard08/QuickScript/releases
- Download the correct binary for your platform
- Run
chmod +x [path to binary here]
- Run the binary!
Via GitHub Actions:
- Head tohttps://nightly.link/RedstoneWizard08/QuickScript/workflows/build/main/binaries
- Download it
- Run it!
For usage details, runqsc --help
Currently, here is the support matrix:
Version | i686 | x86_64 | armv7l | armhf | arm64 |
---|---|---|---|---|---|
0.0.0 | 🔴 | 🔴 | 🔴 | 🔴 | 🟢 |
0.1.0 | 🔴 | 🟡 | 🔴 | 🔴 | 🟢 |
0.3.0 | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 |
0.4.0 | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 |
0.5.x | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 |
0.6.x | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 |
Note that armv7l and armhf support are dependent on Cranelift's support for it.Seecranelift#1173for more details.
Musl builds for i686 are also not supported due to a bug incargo-zigbuild
.Seecargo-zigbuild#96for more details.
Huge thanks toPixeled (@orosmatthew) and hisCreating a Compilerseries, as it helped me think about how to do this best and it gave me theinspiration for this project.
Another huge thanks for thecranelift-jit-demo, as it helped me implement the code generator with Cranelift.
Massive thank you to@cfallin and@bjorn3 for helping me learn how to use Cranelift properly and help me fix some critical issues.
Future plans for QuickScript:
- Add AST validation and errors
- Add
if
statements,while
andfor
loops, function definitions as variables, constant (or static) variables, and more. - Create a language server and syntax for VS Code.
- Port themold linker to Rust and use it internally (programmatically) instead of using an external command call.
About
A quick programming language with a compiler implemented in Rust.