edlang/README.md

51 lines
820 B
Markdown
Raw Permalink Normal View History

2023-03-25 14:29:49 +00:00
# edlang
2024-02-09 08:41:57 +00:00
An experimental statically-typed compiled programming language made with LLVM and Rust.
2023-03-25 14:29:49 +00:00
Syntax is subject to change any time right now. It has a rusty style for now.
2024-02-09 08:41:57 +00:00
```rust
2024-03-13 10:12:36 +00:00
pub fn main() -> i32 {
let b: i32 = factorial(4);
return b;
}
2023-06-03 10:43:12 +00:00
2024-03-13 10:12:36 +00:00
pub fn factorial(n: i32) -> i32 {
if n == 1 {
return n;
} else {
return n * factorial(n - 1);
2024-02-17 16:32:59 +00:00
}
2023-06-03 10:43:12 +00:00
}
2024-03-27 11:08:48 +00:00
mod hello {
pub fn world(ptr: *const u8) -> u8 {
return *ptr;
}
}
2023-03-25 14:29:49 +00:00
```
2024-02-09 08:41:57 +00:00
2024-03-11 11:04:38 +00:00
## edb: The edlang builder
`edb` is a tool like cargo but for edlang:
```
edlang builder
Usage: edlang <COMMAND>
Commands:
new Initialize a project
build Build a project
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
```
2024-02-09 08:41:57 +00:00
## Dependencies
- Rust
2024-04-09 11:00:38 +00:00
- LLVM 18