Updated intro
This commit is contained in:
@@ -14,49 +14,11 @@ All of your favorite Rust libraries work with Mist. It is designed for **low-lev
|
||||
|
||||
Mist is meant to feel like C++ but **be** Rust. It bridges the gap between the ergonomics of a classic systems language and the safety guarantees of Rust's ownership model.
|
||||
|
||||
### Type-First Syntax
|
||||
|
||||
Low-level and embedded development demands clarity about what your data is. Mist puts the **type first** — before the name — so declarations read naturally:
|
||||
|
||||
```mist
|
||||
i32 score = 100;
|
||||
Vec<String> args = env::args().collect();
|
||||
void* data = allocate(size);
|
||||
```
|
||||
|
||||
This mirrors C/C++ declaration syntax, making Mist instantly familiar to embedded and systems programmers while compiling into Rust's strict type system.
|
||||
|
||||
### C-Style Functions
|
||||
|
||||
Functions use the return type before the name — no `fn` keyword needed:
|
||||
|
||||
```mist
|
||||
i32 add(i32 a, i32 b) {
|
||||
a + b
|
||||
}
|
||||
|
||||
void log(message *str) {
|
||||
println!("{}", message);
|
||||
}
|
||||
```
|
||||
|
||||
Every function maps directly to a Rust `fn` underneath.
|
||||
|
||||
### Minimal Friction
|
||||
|
||||
* No `let` keyword — `Type name = value` is all you need.
|
||||
* Consistent `name Type` convention across parameters, fields, and locals.
|
||||
* Explicit pointers with `*T` and `*mut T` — clear intent without ceremony.
|
||||
* String references use `str&` for a natural left-to-right read.
|
||||
|
||||
---
|
||||
|
||||
## Built for Low-Level and Embedded
|
||||
|
||||
Mist is designed from the ground up for systems where resources are constrained and control is required:
|
||||
|
||||
* **No runtime** — no garbage collector, no hidden allocator, no VM.
|
||||
* **Direct memory control** — explicit pointers, manual allocation, predictable layout.
|
||||
* **Zero-cost abstractions** — classes, traits, and generics all resolve at compile time.
|
||||
* **Works with existing Cargo tooling** — use any Rust crate as a library.
|
||||
|
||||
@@ -74,11 +36,11 @@ Mist is not a replacement for Rust; it is an **ergonomic interface** for it. It
|
||||
|
||||
## Bootstrapped Development
|
||||
|
||||
Mist is partially bootstrapped — the compiler's CLI, transpiler, and analyzer modules are written in Mist itself. This gives us first-hand experience with the language's ergonomics and drives real-world improvements with every release.
|
||||
Mist is partially bootstrapped — the compiler's CLI and transpiler modules are written in Mist itself. This gives us first-hand experience with the language's ergonomics and drives real-world improvements with every release.
|
||||
|
||||
## Why Mist?
|
||||
|
||||
* **Familiarity:** C/C++ developers can be productive immediately — no new optical model to learn.
|
||||
* **Familiarity:** C/C++ developers can be productive immediately — no new optical model to learn (Note: Rust's semantics still need to be learned).
|
||||
* **Safety:** Rust's borrow checker and type system under every expression, no exceptions.
|
||||
* **Control:** Explicit types, explicit pointers, explicit allocation — nothing hidden.
|
||||
* **Ecosystem:** The entire Rust crate ecosystem available at your fingertips.
|
||||
|
||||
Reference in New Issue
Block a user