So, for a long time of overthinking I finally realized things that I hate in C and... I wanna try fix them.
use "std/io.cnd";
fn main() -> i32 {
let greetings = [
"Hello world",
"Привет, мир!",
"¡Hola Mundo!",
"Привіт, світе!",
"السلام عليكم!"
];
for value in greetings {
println(value);
}
return 0;
}- Minimalism
- Explicitness
- C compatibility
- Bare metal
- Fast compilation
- LLVM backend
First, you need install the compiler:
curl https://raw.githubusercontent.com/z3nnix/cinder/refs/heads/main/scripts/install.sh | sudo bashscript location is scripts/install.sh
Next, visit Cinder by example and learn Cinder step by step :)
The docs/ directory contains Cinder by Example, a set of short,
self-contained programs with expected output. Every example is verified
automatically (see test/docs_test.rb).
| Chapter | Topic |
|---|---|
| Hello World | running, return codes |
| Variables | let, mut, const, static |
| Types | integers, floats, bool, char, strings |
| Functions | definition, void, early return, unsafe fn |
| Control Flow | if, loop, while, for, switch |
| Structs | fields, methods, sizeof/offsetof |
| Enums | variants, shorthand, switch |
| Arrays and Slices | literals, ranges, slicing |
| Optionals and Errors | ?T, !T, else, ?, unwrap |
| defer | deferred cleanup, LIFO order |
| Compile-Time Code | const, static_assert, sizeof |
| Pointers and Unsafe | *, &null, *void, asm |
| Function Pointers | fn types, callbacks |
| FFI | extern fn, c-strings, varargs |
| Modules | use, export, target filter |
| Standard Library | io, vec, string, str, math, alloc |
| Bare Metal | kernel build, x86.cnd, uart |
See the file LICENSE.
Just send pull-request! Any helpful PR are welcome :3
