Rename the language from Dino to Rex
Files use .rex, the command is rex, and the crate, runtime prefixes, docs, editor files and examples all use the new name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f44f09b6a
commit
7cf9727bcd
94 files changed
+858
-858
No files matched your search
@@ -1,8 +1,8 @@
|
||||
<p align="center">
|
||||
<img src="dino-logo.svg" alt="Dino, the mascot" width="420">
|
||||
<img src="rex-logo.svg" alt="Rex, the mascot" width="420">
|
||||
</p>
|
||||
|
||||
<h1 align="center">Dino</h1>
|
||||
<h1 align="center">Rex</h1>
|
||||
|
||||
<p align="center">
|
||||
A small, fast language. It looks like Go, runs like C, and you never write anything low-level.
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
---
|
||||
|
||||
Dino compiles to C and then to a native program. There is no garbage collector, no pointers
|
||||
Rex compiles to C and then to a native program. There is no garbage collector, no pointers
|
||||
and no manual memory: you write plain code and the compiler works out the rest.
|
||||
|
||||
```dino
|
||||
```rex
|
||||
enum Shape {
|
||||
Circle(r: float)
|
||||
Rect(w, h: float)
|
||||
@@ -52,7 +52,7 @@ func main() {
|
||||
error: age cannot be negative
|
||||
```
|
||||
|
||||
## Why Dino
|
||||
## Why Rex
|
||||
|
||||
- **Simple syntax.** `var`, `func`, `for`, `match`. One loop keyword, no semicolons, no
|
||||
parentheses around conditions. Types are inferred.
|
||||
@@ -63,42 +63,42 @@ error: age cannot be negative
|
||||
missing is `T?`. Both must be handled.
|
||||
- **Modern basics.** Enums that carry data, exhaustive `match`, generics, interfaces,
|
||||
closures, maps, characters, modules.
|
||||
- **C and C++ libraries.** `import "raylib.h"` and call it: Dino reads the header itself,
|
||||
- **C and C++ libraries.** `import "raylib.h"` and call it: Rex reads the header itself,
|
||||
links the library, and builds your own `.c`/`.cpp` files next to the program.
|
||||
- **Tooling included.** A formatter, a language server, and editor files, all in the one `dino`
|
||||
- **Tooling included.** A formatter, a language server, and editor files, all in the one `rex`
|
||||
program.
|
||||
|
||||
## Get started
|
||||
|
||||
You need a [Rust toolchain](https://rustup.rs) to build the compiler and a C compiler
|
||||
(`gcc` or `clang`, available as `cc`) to build your programs. Dino itself has no dependencies.
|
||||
(`gcc` or `clang`, available as `cc`) to build your programs. Rex itself has no dependencies.
|
||||
|
||||
```text
|
||||
cargo build --release
|
||||
cp target/release/dino ~/.local/bin/ # or anywhere on your PATH
|
||||
cp target/release/rex ~/.local/bin/ # or anywhere on your PATH
|
||||
```
|
||||
|
||||
Save this as `hello.dino`:
|
||||
Save this as `hello.rex`:
|
||||
|
||||
```dino
|
||||
```rex
|
||||
func main() {
|
||||
print("Hello, Dino!")
|
||||
print("Hello, Rex!")
|
||||
}
|
||||
```
|
||||
|
||||
```text
|
||||
dino run hello.dino
|
||||
rex run hello.rex
|
||||
```
|
||||
|
||||
| Command | What it does |
|
||||
|---------|--------------|
|
||||
| `dino run file.dino [args...]` | Compile and run. Extra words reach the program as `os.args`. |
|
||||
| `dino build file.dino -o out` | Make an executable you can keep. |
|
||||
| `dino check file.dino` | Look for errors without building. |
|
||||
| `dino emit-c file.dino` | Print the generated C. |
|
||||
| `dino fmt [--check] path...` | Format code (`--check` only reports). |
|
||||
| `dino lsp` | Start the language server (editors run this for you). |
|
||||
| `dino header file.h [word]` | Show what Dino can use from a C header. |
|
||||
| `rex run file.rex [args...]` | Compile and run. Extra words reach the program as `os.args`. |
|
||||
| `rex build file.rex -o out` | Make an executable you can keep. |
|
||||
| `rex check file.rex` | Look for errors without building. |
|
||||
| `rex emit-c file.rex` | Print the generated C. |
|
||||
| `rex fmt [--check] path...` | Format code (`--check` only reports). |
|
||||
| `rex lsp` | Start the language server (editors run this for you). |
|
||||
| `rex header file.h [word]` | Show what Rex can use from a C header. |
|
||||
|
||||
## Learn the language
|
||||
|
||||
|
||||
Reference in new issue
Block a user