Merge pull request #11 from mist-go/massive-update

Restructure documentation into categorized guide and internals
This commit is contained in:
2026-07-03 10:52:43 +02:00
committed by GitHub
44 changed files with 1381 additions and 1252 deletions
-135
View File
@@ -1,135 +0,0 @@
---
title: Classes
description: Unified data and behavior with Java-style organization and Rust-powered execution.
icon: Shapes
---
Classes in Mist bridge the gap between Java's organizational structure and Rust's performance. They group fields, constructors, and methods within a single cohesive block, using C-style method signatures with `&self` for the instance parameter.
## Basic Syntax
A class groups fields and methods together. Fields use semicolons and the `Type name` convention. Methods use C-style syntax with `&self` as the first parameter for shared access.
```mist
pub class Logger {
String prefix;
pub void info(&self, message str&) {
self.log(LogLevel::Info, message);
}
void log(&self, LogLevel level, message str&) {
println!("{level} {} {}", self.prefix, message);
}
}
```
## The Constructor
Mist uses the explicit `constructor` keyword for initialization:
```mist
pub constructor() {
self.prefix = "default".to_string();
}
```
Constructors can take parameters:
```mist
pub constructor(String prefix) {
self.prefix = prefix;
}
```
## Instance Methods & `&self`
Methods use `&self` (shared reference) or `&mut self` (mutable reference) as the first parameter.
```mist
pub void warning(&self, message str&) {
self.log(LogLevel::Warning, message);
}
pub void reset(&mut self) {
self.prefix = String::new();
}
```
## Inheritance
Classes support single inheritance with the `:` syntax. Use `super = Super::new()` in the constructor to call the parent constructor. Override methods by placing `override(Parent)` after the parameter list.
```mist
pub class Animal {
pub String name;
constructor() {
self.name = "Rex".to_string();
}
pub String speak(&self) {
"Unknown".to_string()
}
}
pub class Dog : Animal {
constructor() {
super = Super::new();
}
pub String speak(&self) override(Animal) {
"Woof!".to_string()
}
}
```
## Trait Implementations
Traits can be implemented directly inside a class body:
```mist
pub class Dog : Animal {
constructor() {
self.name = name;
}
pub String speak(&self) override(Animal) {
"Woof!".to_string()
}
impl std::fmt::Display {
Result<(), std::fmt::Error> fmt(&self, std::fmt::Formatter<'_> mut& f) {
write!(f, "🐾 {}", self.name)
}
}
}
```
## Generics
Classes support generic type parameters:
```mist
pub class Container<T> {
T value;
constructor(T val) {
self.value = val;
}
pub &T get(&self) {
&self.value
}
}
```
## Key Characteristics
- **Unified Scope**: Data and behavior live in one class block.
- **C-Style Methods**: Return type before name — no `fn` keyword.
- **`&self` Parameter**: The self reference is explicit and uses `&` syntax.
- **Inheritance**: Single inheritance with `override(Parent)` for polymorphic dispatch.
- **Encapsulation**: Visibility modifiers (`pub`) control API exposure.
- **Inline Impl**: Traits can be implemented directly within the class body.
- **Zero-Cost Classes**: Under the hood, Mist desugars these into idiomatic Rust structs and implementation blocks.
-87
View File
@@ -1,87 +0,0 @@
---
title: Enums
description: Defining algebraic data types with Mist's type-first convention.
icon: Layers
---
Enums in Mist serve as powerful algebraic data types (ADTs), maintaining the exact behavior and safety of Rust enums while using parentheses for tuple variants and `Type name` for struct-like fields.
## Basic Syntax
An enum can contain unit variants, tuple variants (with types in parentheses), or struct-like variants.
```mist
pub enum TaskState {
Pending,
InProgress,
Completed,
Failed {
String reason,
i32 code,
},
}
```
## Variant Types
Mist supports all standard variant shapes:
```mist
enum OptionInt {
None, // Unit
Some(i32), // Tuple (parentheses)
}
enum Shape {
Circle { i32 radius }, // Struct-like
Rect { i32 w, i32 h },
}
```
### Instantiation & Matching
Tuple variants are created and matched with parentheses:
```mist
let x = OptionInt::Some(42);
match x {
OptionInt::None => { println!("none"); }
OptionInt::Some(v) => { println!("{}", v); }
}
```
Struct variants use brace notation:
```mist
let c = Shape::Circle {
radius: 5,
};
match c {
Shape::Circle { radius } => { println!("{}", radius); }
Shape::Rect { .. } => { /* ignore */ }
}
```
## Generics
Enums declare generics and lifetimes in angle brackets after the name.
```mist
pub enum Validation<'a, T> {
Valid(T),
Invalid {
&'a str message,
u32 error_id,
},
}
```
## Key Characteristics
- **Consistent Declaration**: Struct-like variants use `Type name` order, consistent with Mist structs.
- **Parentheses Tuples**: Tuple variants use `()` syntax, consistent with Rust.
- **Rust-Native ADTs**: Enums compile directly to Rust enums, allowing exhaustive pattern matching and zero-cost abstraction.
- **Shared Visibility**: The `pub` modifier at the enum level exports all variants.
- **Comma-Separated Members**: Fields within struct-like variants are separated by commas.
-102
View File
@@ -1,102 +0,0 @@
---
title: Functions
description: Defining execution blocks with C-style ergonomics and Rust-powered safety.
icon: SquareFunction
---
Functions are the primary unit of execution in Mist, using C-style syntax with the return type before the name. The last expression in a block is implicitly returned.
## Basic Syntax
Functions place the return type before the name, followed by parameters in parentheses.
```mist
void greet() {
println!("Hello!");
}
i32 add(i32 a, i32 b) {
a + b
}
```
## Visibility & Modules
Functions use `pub` for public visibility. Files declare a module with `pub module name;`.
```mist
pub module utils;
pub i32 get_version() {
1
}
pub void process() {
// ...
}
```
## Mutable Parameters
Use `mut` after the type to allow reassignment within the function body.
```mist
void update_score(i32 mut current_score, i32 bonus) {
current_score = current_score + bonus;
}
```
## Methods & `&self`
Methods take `&self` (immutable) or `&mut self` (mutable) as the first parameter.
```mist
struct Counter {
i32 value,
}
impl Counter {
pub i32 get(&self) {
self.value
}
pub void increment(&mut self) {
self.value += 1;
}
}
```
## Closures
Closures are anonymous functions defined with arrow syntax:
```mist
let add = (a, b) => a + b;
add(2, 3);
// With a block body
let greet = (name str&) => {
println!("Hello {}", name);
};
```
## Attributes & Metadata
Metadata is applied via the `#[attr]` syntax directly above the declaration.
```mist
#[inline]
pub i32 clamp(i32 value, i32 min, i32 max) {
if value < min { min }
else if value > max { max }
else { value }
}
```
## Key Characteristics
- **C-Style Syntax**: Return type before name — no `fn` keyword.
- **Implicit Returns**: The final expression in a block is automatically returned.
- **`&self` / `&mut self`**: Explicit self parameter in method definitions.
- **Closure Support**: Arrow syntax `(params) => expr` for anonymous functions.
- **Zero-Cost Mapping**: Every function maps directly to a Rust `fn`.
@@ -1,85 +0,0 @@
---
title: Modules & Imports
description: Organizing code across files with module declarations and path-based imports.
icon: FolderTree
---
Mist organizes code through a file-system based module system with explicit path imports.
## Module Declarations
Each `.mist` file declares itself as a module with `pub module name;` at the top. A `package.mist` file acts like `mod.rs` — it is the entry point for its directory.
```mist
// src/utils/helper.mist
pub module helper;
pub void greet() {
println!("Hello!");
}
```
```mist
// src/utils/package.mist
pub module utils;
// This module exports submodules and items
```
## Imports
Use the `use` keyword with a path to bring items from other modules or external crates into scope.
```mist
use std::fs;
use std::process;
use std::path::Path;
use std::collections::HashMap;
// Import specific items
use my_module::Helper;
```
### Visibility
Items can be re-exported with a visibility modifier on the import:
```mist
pub use internal::format;
```
## Sidefiles
Any non-`.mist` file in `src/` (e.g., `.rs`, `.toml`, data files) is treated as a **sidefile** — it is copied directly into the output directory `.mist/src/` during transpilation. This allows you to keep Rust helper files or configuration alongside your Mist source.
```text
src/
├── main.mist
├── helper.rs # copied to .mist/src/helper.rs
└── config/
└── data.json # copied to .mist/src/config/data.json
```
## Project Structure
A typical Mist project looks like this:
```
my-project/
├── Cargo.toml
├── Mist.toml
├── src/
│ ├── main.mist
│ ├── my_api/
│ │ ├── package.mist
│ │ ├── methods.mist
│ │ └── utils.mist
└── .mist/
└── src/
├── main.rs
└── my_api/
├── mod.rs
├── methods.rs
└── utils.rs
```
The `.mist/src/` directory contains the transpiled Rust output.
@@ -1,67 +0,0 @@
---
title: Pointers & References
description: Explicit memory access with postfix reference syntax and Rust-native safety.
icon: MousePointer2
---
Mist uses a postfix `&` syntax for reference types. While familiar from C++, these references adhere strictly to Rust's ownership and borrowing rules.
## Basic Syntax
Reference types are written with `&` after the type. Use `mut&` for mutable references. The `&` and `&mut` operators create references from values.
```mist
i32 x = 42;
i32& r = &x;
let mut y = 42;
i32 mut& r = &mut y;
*r = 100;
```
In function parameters:
```mist
void increment(i32 mut& value, i32& limit) {
if *value < *limit {
*value = *value + 1;
}
}
```
## Lifetimes
Lifetimes are placed before the type in the `&` suffix:
```mist
pub struct Inspector<'a> {
&'a str target,
&'a mut u32 counter,
}
```
## In Classes
Methods use `&self` for immutable access and `&mut self` for mutable access:
```mist
pub class Logger {
String prefix;
pub void info(&self, message str&) {
println!("{}", message);
}
pub void reset(&mut self) {
self.prefix = String::new();
}
}
```
## Key Characteristics
- **Postfix Reference Syntax**: `T&` for shared references, `T mut&` for mutable references.
- **Explicit Intent**: The `mut&` syntax clearly distinguishes read-only from writable references.
- **Visual Consistency**: Lifetimes (`'a`) are placed before the type in `&'a T`.
- **Safety Guaranteed**: The Mist compiler enforces Rust's borrow checker.
- **Zero Overhead**: Mist references compile to identical machine code as Rust references.
-84
View File
@@ -1,84 +0,0 @@
---
title: Structs
description: Data modeling with Mist's type-first field convention.
icon: Form
---
Structs in Mist follow the same structural logic as Rust, with fields using the language-wide `Type name` convention and comma-separated grouping.
## Basic Syntax
A struct is defined by its name followed by a block of fields. Each field places the type before the identifier.
```mist
pub struct Task {
pub String name,
pub TaskState state,
pub i32 executions,
}
```
## Visibility
Use the `pub` modifier to make the struct or its individual fields accessible from other modules.
```mist
pub struct NetworkNode {
pub u32 id,
str& address,
}
```
## Instantiation
Structs are instantiated using standard brace syntax.
```mist
let task = Task {
name: "Initialize".to_string(),
state: TaskState::Pending,
executions: 0,
};
```
## Mutation
Use `let mut` to allow field reassignment.
```mist
let mut p = Point {
x: 1,
y: 2,
};
p.x = 100;
```
## Destructuring
Struct patterns use `let` with the struct name and field bindings:
```mist
let p = Point {
x: 3,
y: 4,
};
let Point { x, y } = p;
```
## Generics
Generics and lifetimes are declared in angle brackets after the struct name.
```mist
pub struct Buffer<'a, T> {
&'a T data,
usize len,
}
```
## Key Characteristics
- **Type-First Declaration**: Fields use `Type name` order, consistent with function parameters and variable declarations.
- **Comma-Separated Members**: Fields are separated by commas, maintaining a clean delimiter style.
- **Rust Compatibility**: Maps 1:1 to Rust structs, ensuring zero-cost abstraction and full ecosystem interoperability.
- **Direct Visibility**: The `pub` modifier controls access at the struct and field level.
-70
View File
@@ -1,70 +0,0 @@
---
title: Traits
description: Defining shared behavior and contracts with Mist's signature ergonomics.
icon: Sparkles
---
Traits in Mist define a set of methods that a type must implement, facilitating polymorphism and shared behavior. Method signatures use C-style syntax with `&self` for the instance parameter.
## Defining a Trait
A trait lists method signatures using return-type-first syntax, with `&self` as the instance parameter.
```mist
pub trait Drawable {
void draw(&self);
str& metadata(&self);
}
```
## Implementing a Trait
Use `impl Trait for Type` to provide implementations:
```mist
impl Drawable for Task {
void draw(&self) {
println!("Drawing task: {}", self.name);
}
str& metadata(&self) {
self.name
}
}
```
## Default Implementations
Traits can provide default behavior for methods that implementing types may override:
```mist
pub trait Identifiable {
u32 get_id(&self);
bool is_valid(&self) {
self.get_id() > 0
}
}
```
## Super-traits
A trait can require another trait using the colon `:` syntax:
```mist
pub trait Speak {
String speak(&self);
}
pub trait Greet : Speak {
String greet(&self);
}
```
## Key Characteristics
- **C-Style Signatures**: Return type before name — no `fn` keyword.
- **Explicit Context**: Methods use `&self` as the first parameter, mapping directly to Rust's reference rules.
- **Default Methods**: Traits can provide default implementations.
- **Super-traits**: Colon syntax for expressing trait requirements.
- **Static Dispatch**: By default, Mist traits leverage Rust's zero-cost generics and monomorphization.
+48
View File
@@ -0,0 +1,48 @@
---
title: Compiler Architecture
description: High-level pipeline overview of the Mist compiler and crate organization.
icon: Building2
---
### Pipeline Overview
The Mist compiler operates in distinct phases:
```
Source (.mist)
│
▼
┌─────────────┐
│ Lexer │ (pest PEG grammar)
│ & Parser │
└─────────────┘
│ AST
▼
┌─────────────┐
│ Semantics │ (field init checking)
└─────────────┘
│
▼
┌─────────────┐
│ Codegen │ (AST → Rust source)
└─────────────┘
│ .rs + .map.json
▼
┌─────────────┐
│ cargo │ (Rust compilation)
└─────────────┘
│
▼
Binary / Library
```
### Crate Organization
The compiler is written in Rust and Mist itself, organized into four main crates:
| Crate | Language | Role |
|-------|----------|------|
| **mist-parser** | Rust | PEG parsing via pest, AST construction, semantic checks, position mapping |
| **mist-codegen** | Rust | AST → Rust source code generation |
| **mist-analyzer** | Rust | Language server bridging mist-editor ↔ rust-analyzer |
| **mist-api** | Mist | Orchestrates transpilation, module tree building, cargo invocation, error remapping |
+32
View File
@@ -0,0 +1,32 @@
---
title: Attributes
description: Inner and outer attributes for modules, items, and metadata.
icon: Hash
---
Inner attributes apply to the containing module:
```mist
#![allow(unused_variables)]
```
Outer attributes apply to the next item:
```mist
#[derive(Debug, Clone)]
struct Point {
i32 x,
i32 y,
}
#[test]
void my_test()
{
assert_eq!(1, 1);
}
```
Attribute syntax:
- `#[path]`
- `#[path = literal]`
- `#[path(item1, item2, ...)]`
+69
View File
@@ -0,0 +1,69 @@
---
title: Classes
description: Class declarations, constructors, inheritance, virtual dispatch, and the override keyword.
icon: Shapes
---
Mist introduces `class` as syntactic sugar for a Rust struct with a virtual method table (vtable).
```mist
pub class Animal {
str& name,
pub constructor(str& name)
{
self.name = name;
}
pub void speak(&self)
{
println!("...");
}
}
```
Class fields can have default initializers:
```mist
class Player {
i32 health = 100,
str& name,
}
```
### Inheritance
```mist
class Dog : Animal {
pub constructor(str& name)
{
super(name);
}
void speak(&self) override
{
println!("Woof!");
}
}
```
The `override` keyword supports explicit base class targeting (Required if overriding a nested parent):
```mist
void speak(&self) override(Animal)
{
println!("Woof!");
}
```
### Under the Hood
A class `Dog : Animal` generates:
1. A Rust struct with a `_super: Animal` field (or `_vptr: &'static [*const c_void]` for root classes)
2. A vtable constant with function pointers for each public method
3. An `impl` block with `Deref<Target = Animal>` and `DerefMut`
4. Method trampolines (`__m_<name>`) that are dispatched through the vtable
5. A `new()` constructor that initializes via `MaybeUninit` and calls the user's `constructor(&mut self)`
The vtable is unified: parent entries are copied, overridden entries replace parent slots, and new methods are appended.
+87
View File
@@ -0,0 +1,87 @@
---
title: Control Flow
description: If/else, while, for, c-style for, loop, match, break, continue, and return.
icon: ArrowLeftRight
---
### If/Else
```mist
if condition {
// body
} else if other_condition {
// body
} else {
// body
}
```
Conditions must be parenthesized: `if (expr) { }` or `if expr_no_struct { }` (struct literals require parentheses).
Used as an expression:
```mist
let x = if true { 1 } else { 2 };
```
### While
```mist
while condition {
// body
}
```
### For
```mist
for pattern in iterator {
// body
}
for i in 0 .. 10 {
// body
}
```
### C-Style For
```mist
for (let mut i = 0; i < 10; i++) {
// body
}
```
### Loop
```mist
loop {
// infinite loop
}
```
### Match
```mist
match value {
pattern1 => expr,
pattern2 => {
// block body
}
pattern3 | pattern4 => expr,
}
```
### Break / Continue
```mist
break;
continue;
```
### Return
```mist
return;
return value;
```
+58
View File
@@ -0,0 +1,58 @@
---
title: Functions
description: Function declarations, self parameters, return types, and unsafe functions.
icon: SquareFunction
---
```mist
// Return type is `void` (unit)
void greet(str& name)
{
println!("Hello, {name}");
}
// With return type
i32 add(i32 a, i32 b)
{
return a + b;
}
// Expression body (last expression is the return value)
i32 square(i32 x)
{
x * x
}
// Public function
pub i32 multiply(i32 a, i32 b)
{
a * b
}
// Generic function
T identity<T>(T value)
{
value
}
// Unsafe function
unsafe i32 dangerous()
{
42
}
```
Function syntax: `[pub] [void | <type>] <name>[<generics>](<params>) [override] { <body> }`
Functions use **Allman brace style** (opening brace on the next line).
### Self Parameter
Methods can take `self`, `mut self`, `&self`, `&mut self` additionally with lifetimes:
```mist
pub void set_value(&mut self, i32 v)
{
self.value = v;
}
```
+39
View File
@@ -0,0 +1,39 @@
---
title: Generics
description: Generic functions, structs, enums, trait bounds, and lifetimes.
icon: Braces
---
```mist
// Generic function
T id<T>(T x)
{
x
}
// Generic struct
struct Pair<A, B> {
A first,
B second,
}
// Generic enum
enum Result<T, E> {
Ok(T),
Err(E),
}
// Generic with trait bounds
T max<T : Ord>(T a, T b)
{
if a > b { a } else { b }
}
// Lifetime generics
void process<'a>(&'a str& data)
{
// ...
}
```
Generic syntax uses `<` `>` delimiters. Lifetimes are prefixed with `'`.
+33
View File
@@ -0,0 +1,33 @@
---
title: Modules & Imports
description: Module declarations, imports, re-exports, and module resolution rules.
icon: FolderTree
---
Mist's module system was created to fix Rust's dreaded parent-declared module system, files declare themselves and their publicity via `pub module my_mod;` as the first statement.
```mist
// Declare a module
pub module foo;
// Import
use std::collections::HashMap;
// Re-exporting import (alias)
pub use my_module::MyType;
```
### Module Resolution
Mist maps the module tree to Rust's module system:
| Mist Path | Rust Output |
|------------------------------|------------------------------|
| `src/main.mist` | `.mist/src/main.rs` |
| `src/utils/package.mist` | `.mist/src/utils/mod.rs` |
| `pub module foo;` | `.mist/src/foo.rs` |
A `package.mist` file acts as a directory's module root, analogous to `mod.rs`, but it's not required, as long as the directory contains `.mist` files, it will auto generate `mod.rs`.
#### *💡 Tip*: File names don't matter, `module my_mod` determines the name.
+98
View File
@@ -0,0 +1,98 @@
---
title: Operators, Macros & Closures
description: Binary, prefix, and postfix operators, macro calls, and closure expressions.
icon: Plus
---
### Binary Operators
| Operator | Description |
|----------|----------------------|
| `+` | Addition |
| `-` | Subtraction |
| `*` | Multiplication |
| `/` | Division |
| `%` | Modulus |
| `==` | Equality |
| `!=` | Inequality |
| `<` | Less than |
| `>` | Greater than |
| `<=` | Less or equal |
| `>=` | Greater or equal |
| `&&` | Logical AND |
| `\|\|` | Logical OR |
| `&` | Bitwise AND |
| `\|` | Bitwise OR |
| `^` | Bitwise XOR |
| `<<` | Left shift |
| `>>` | Right shift |
| `=` | Assignment |
| `+=` | Add assign |
| `-=` | Subtract assign |
| `*=` | Multiply assign |
| `/=` | Divide assign |
| `%=` | Modulus assign |
| `&=` | Bitwise AND assign |
| `\|=` | Bitwise OR assign |
| `^=` | Bitwise XOR assign |
| `<<=` | Left shift assign |
| `>>=` | Right shift assign |
| `..` | Range (exclusive) |
| `..=` | Range (inclusive) |
| `->` | Pointer write |
### Prefix Operators
| Operator | Description |
|----------|-------------------|
| `*` | Dereference |
| `&` | Reference |
| `&mut` | Mutable reference |
| `!` | Logical NOT |
| `-` | Numeric negation |
### Postfix Operators
| Operator | Description |
|------------|----------------------|
| `.field` | Field access |
| `.0` | Tuple field access |
| `()` | Function call |
| `[]` | Index |
| `{ f: v }` | Struct literal |
| `as Type` | Type cast |
| `?` | Try (error prop) |
| `++` | Increment |
| `--` | Decrement |
| `!()` | Macro call (paren) |
| `![]` | Macro call (bracket) |
| `!{}` | Macro call (brace) |
### Macros
Mist reuses Rust's macro system directly:
```mist
println!("hello");
assert_eq!(a, b);
vec![1, 2, 3];
```
Macro calls use `!` followed by parentheses, brackets, or braces.
### Closures
```mist
let add = (a, b) => a + b;
let result = add(2, 3); // 5
f64 fn() square = (x) => x * x;
```
Closures can have explicit return types:
```mist
let transform = i32 (x) => {
x * 2
};
```
+41
View File
@@ -0,0 +1,41 @@
---
title: Patterns
description: Pattern matching with literals, tuples, structs, named tuples, wildcards, and mutable bindings.
icon: Split
---
```mist
// Literal patterns
match x {
1 => "one",
2 => "two",
_ => "other",
}
// Tuple patterns
let (a, b) = (1, 2);
// Struct patterns
match value {
Point { x, y } => x + y,
Point { x: 0, y } => y,
_ => 0,
}
// Named tuple patterns (newtype)
let MyType(value) = my_var;
// Wildcard / etc
let _ = get_side_effect();
match x {
1 => ...,
.. => ..., // rest / etc
}
// Mutable binding in pattern
let mut x = 42;
match ref_to_option {
Some(mut value) => value += 1,
None => {},
}
```
+47
View File
@@ -0,0 +1,47 @@
---
title: Structs & Enums
description: Defining structs and enums with named, tuple, and struct variants.
icon: Box
---
### Structs
```mist
pub struct Point {
i32 x,
i32 y,
}
pub struct Generic<T> {
T value,
}
```
Fields can be public or private:
```mist
struct User {
pub str& name,
i32 age, // private
}
```
### Enums
```mist
pub enum Option<T> {
Some(T),
None,
}
pub enum Message {
Quit,
Move(i32, i32),
Write { str& content, i32 length },
}
```
Enum variants can be:
- **Named** — `Variant`
- **Tuple** — `Variant(T1, T2)`
- **Struct** — `Variant { T1 field1, T2 field2 }`
+45
View File
@@ -0,0 +1,45 @@
---
title: Syntax Overview
description: Comments, literals, identifiers, and keywords in Mist.
icon: Code
---
### Comments
```mist
// Line comments only
```
### Literals
```mist
42 // Integer
3.14 // Float
true // Boolean
false // Boolean
"hello" // String
(1, true, "x") // Tuple
```
### Identifiers & Keywords
Keywords are reserved and cannot be used as identifiers:
`if`, `else`, `fn`, `for`, `while`, `match`, `return`, `break`, `continue`, `struct`, `enum`, `class`, `trait`, `impl`, `use`, `pub`, `mut`, `let`, `true`, `false`, `dyn`, `loop`, `unsafe`, `override`, `const`, `type`
Identifiers follow the pattern `[a-zA-Z_][a-zA-Z0-9_]*`.
### Visibility
```mist
// Private (default)
void internal() { }
// Public
pub void external() { }
// Public to specific path
pub(crate) void crate_only() { }
pub(super) void parent_only() { }
pub(my::module) void module_only() { }
```
+42
View File
@@ -0,0 +1,42 @@
---
title: Traits & Impls
description: Defining traits, trait bounds, and implementation blocks.
icon: Puzzle
---
### Traits
```mist
pub trait Drawable {
void draw(&self);
}
pub trait Comparable<T> : Eq {
i32 cmp(&self, T other);
}
```
Trait requirements are specified after `:`:
```mist
trait MyTrait : SuperTrait + OtherTrait {
void required_method(&self);
void another(&self);
}
```
### Impl Blocks
```mist
impl MyType {
void method(&self) { }
}
impl Trait for MyType {
void method(&self) { }
}
impl<T> GenericTrait<T> for MyType {
void method(&self, T value) { }
}
```
+47
View File
@@ -0,0 +1,47 @@
---
title: Types
description: The Mist type system including references, pointers, tuples, function types, and trait objects.
icon: Type
---
### Type System
```mist
i32 // Path type
str& // Reference type
i32 mut& // Mutable reference
i32 'a& // Reference with lifetime
i32 unsafe& // Const pointer
i32 mut unsafe& // Mutable pointer
(i32, bool) // Tuple type
bool fn(i32) // Function pointer type
bool Fn(i32) // Closure trait (Fn)
bool FnMut(i32) // Closure trait (FnMut)
bool FnOnce(i32) // Closure trait (FnOnce)
dyn Trait // Trait object
void // Unit type (maps to Rust's ())
'lifetime // Lifetime
```
Type expressions can be composed:
```mist
type_expr = { (void | path_type | tuple_type | dyn_type) ~ (unsafe_ref_type | ref_type | fn_type)* }
```
This means types are written left-to-right naturally:
```mist
i32& // &i32
i32 mut& // &mut i32
i32 'a& // &'a i32
bool fn(i32) // fn(i32) -> bool
```
### Type Aliases
```mist
type MyInt = i32;
type Result<T> = std::result::Result<T, str&>;
```
+30
View File
@@ -0,0 +1,30 @@
---
title: Variables
description: Variable declarations, mutability, type annotations, and destructuring.
icon: Variable
---
```mist
let x = 42; // Type-inferred immutable
let mut y = 10; // Mutable variable
i32 z = 100; // Explicit type annotation
str& s = "hello"; // Typed string reference
bool b = true; // Typed boolean
f64 f = 3.14; // Typed float
let (a, b) = (1, "two"); // Destructuring
let (x, (y, z)) = (1, (2, 3)); // Nested destructuring
```
Variable declarations follow either of two forms:
```mist
let <pattern> [= <expr>];
<type> <pattern> [= <expr>];
```
### Const and Static
```mist
const MAX: i32 = 100;
static NAME: str& = "hello";
```
+25 -41
View File
@@ -11,7 +11,7 @@ Mist is currently distributed as a Cargo crate. To get started, you'll need to h
Run the following command to install the Mist toolchain: Run the following command to install the Mist toolchain:
```bash title="Terminal" ```bash title="Terminal"
cargo install [email protected].7-alpha.0 cargo install [email protected].8-alpha.0
``` ```
> (ℹ) For a more streamlined development experience, Install the following VSCode extensions: > (ℹ) For a more streamlined development experience, Install the following VSCode extensions:
@@ -26,36 +26,15 @@ mist version
--- ---
## 2. Setting Up Your Cargo Project ## 2. Setting Up Your Mist Project
```bash
Mist works alongside Cargo to handle the heavy lifting. Use `cargo new` or `cargo init` to scaffold a new project: mist new mist-hello-world
```
```bash title="Terminal" or
cargo new my-mist-app ```bash
cd my-mist-app mist init
``` ```
This creates a `src/main.mist` and wires up the output directory (`.mist/src/`) in your `Cargo.toml`.
### 3. Adding mist to your Cargo project
Mist needs a `Mist.toml` in the root of the project (Alongside `Cargo.toml`) to know what to transpile as the main file (eg. main.mist, lib.mist).
```toml title="Mist.toml"
# main.mist is now the main package
package = "main.mist"
# Side packages that work as cargo binaries
packages = []
```
Source files go in `src/` and the transpiled output goes to `.mist/src/`. Non-Mist files in `src/` (e.g. Rust sidecar files) are copied through as-is.
---
## 4. Your First Program
Create a new file at `src/main.mist` and add the following code:
```mist title="src/main.mist" ```mist title="src/main.mist"
void main() { void main() {
@@ -63,13 +42,10 @@ void main() {
} }
``` ```
### Build and Run ### 3. Build and Run
```bash title="Terminal" ```bash title="Terminal"
mist run # or: mist r mist run
mist build # or: mist b
mist check # or: mist c
mist transpile # or: mist t
``` ```
--- ---
@@ -78,10 +54,18 @@ mist transpile # or: mist t
| Command | Alias | Description | | Command | Alias | Description |
| -------------------- | ----- | ----------------------------------------------- | | -------------------- | ----- | ----------------------------------------------- |
| `mist init` | | Initializes a new Mist project (Deprecated) | | mist run |r| |run the project |
| `mist run` | `r` | Runs the project in the current directory | | mist build |b| |build the project |
| `mist build` | `b` | Builds the project in the current directory | | mist transpile |t |transpile the project |
| `mist transpile` | `t` | Transpiles the project in the current directory | | mist check |c |check the project |
| `mist check` | `c` | Checks the project in the current directory | | mist test| |test the project |
| `mist version` | `-v` | Prints the compiler version | | mist publish| |publish the project |
| `mist help` | `-h` | Prints this message | | mist bench| |benchmark the project |
| mist doc| |build documentation |
| mist fix| |automatically fix warnings |
| mist clippy| |lint the project |
| mist clean| |clean build artifacts |
| mist init| |initialize a project in the current folder |
| mist new| |create a new project |
| mist version|-v |print the compiler version |
| mist help|-h |print this message |
+34
View File
@@ -0,0 +1,34 @@
---
title: Builder & Error Remapping
description: How Mist invokes cargo and remaps Rust compiler errors back to Mist source locations.
icon: Bug
---
The builder module (`builder.mist` in the `mist_api` crate) wraps `cargo` to:
1. Spawn `cargo` with `--message-format=json`
2. Parse JSON compiler messages
3. For each diagnostic span, look up the corresponding `.map.json` file
4. Remap Rust line/column to Mist line/column using the mapping
5. Display errors/warnings with Mist source locations and context lines
```rust
pub fn build(args: Vec<String>, root: PathBuf) -> bool {
// Spawn cargo with JSON output
// Parse CompilerMessage for each span
// Look up rev_mapper::Mapping from .map.json
// Remap to Mist positions
// Print diagnostics
}
```
### Diagnostic Output
Errors and warnings are displayed with Mist source context:
```
src/main.mist:10:5
Error: mismatched types
let x: i32 = "hello";
^^^^^^^
```
+53
View File
@@ -0,0 +1,53 @@
---
title: Code Generation
description: How the Mist AST is translated into Rust source code, including class vtables and position mapping.
icon: Wrench
---
The code generator converts the Mist AST into Rust source code directly — no intermediate representation.
### Key files
- `src/lib.rs` — `RustCodegen` struct with output buffer, indentation tracking, `Mapping` for position translation
- `src/top_level.rs` — Generates Rust for top-level items (structs, enums, traits, functions, impls, imports, type aliases, const/static)
- `src/statement.rs` — Generates Rust for statements and blocks
- `src/expr.rs` — Generates Rust for expressions (literals, paths, binary ops, closures, arrays, prefix/postfix)
- `src/class_decl.rs` — Class-specific code generation (struct + vtable + impl blocks + Deref)
### Codegen Design
The `RustCodegen` maintains:
- A string `output` buffer
- An `indent` level (4 spaces per level)
- A `Mapping` that records `(RustMap, MistMap)` pairs for source position remapping
- A current `position` tracker (`RustMap(line, column)`)
Generation follows the `GenRust` trait:
```rust
pub trait GenRust {
fn gen_rust(&self, ctx: &mut Context, cg: &mut RustCodegen);
}
```
And `GetRust` for simple string-returning types:
```rust
pub trait GetRust {
fn get_rust(&self) -> String;
}
```
The `Context` carries optional expression path information for class `super` / `Super` resolution.
### Class Codegen
Classes are the most complex codegen path. `ClassProcessedData` analyzes a class declaration and emits:
1. **Struct declaration** — `struct ClassName<G> { pub _super: Parent, pub field1: T1, ... }` (or `_vptr` for root classes)
2. **Vtable constants** — Index constants `__FN_METHOD` and a `__V_TABLE` static array of function pointers. For inherited classes, parent vtable entries are copied and overridden entries replaced.
3. **Constructor** — `pub fn new(...) -> Self` that creates an uninitialized instance via `MaybeUninit`, sets the vtable pointer, writes field defaults, calls `self.constructor(...)`, and returns `this`
4. **Method trampolines** — Public methods with `self` get wrapper functions `__m_method` stored in the vtable, plus virtual dispatch methods
5. **Override support** — Methods marked `override` are validated at compile time via generated test code
6. **Deref impls** — `impl Deref<Target = Parent> for Child` and `DerefMut` for inherited classes
7. **Impl declarations** — Inner `impl` blocks are rewritten to use the self type
+55
View File
@@ -0,0 +1,55 @@
---
title: LSP Support
description: How the Mist Language Server bridges editor requests through rust-analyzer.
icon: Server
---
The Mist Language Server Protocol implementation runs a headless `rust-analyzer` instance and bridges Mist editor requests to Rust positions.
### Architecture
```
Editor (LSP client)
│
▼
┌─────────────────────┐
│ mist-analyzer │
│ (Rust + Mist) │
└─────────────────────┘
│ ▲
│ JSON-RPC │
▼ │
┌─────────────────────┐
│ rust-analyzer │
│ (headless child) │
└─────────────────────┘
```
### Flow
1. Editor sends Mist file edits to `mist-analyzer` via LSP
2. `mist-analyzer` transpiles Mist to Rust
3. The transpiled Rust is forwarded to the headless `rust-analyzer` process
4. For goto-definition, hover, and completion, a unique marker token is injected at the cursor position
5. The transpiled output with the marker is sent to `rust-analyzer`
6. The marker position is located in the response
7. Results are mapped back to Mist positions using the `rev_mapper`
### Key Features
- **Full document sync** — Open, change, save, close
- **Go to definition** — Maps through transpiled Rust positions
- **Completions** — Supports trigger characters `:`, `.`, `'`, `(`
- **Hover** — Type information and docs
- **Diagnostics** — Real-time errors from transpilation failures and Rust compilation
- **Formatting** — Document formatting support
- **Auto-import** — Automatically inserts `pub module <name>;` when new `.mist` files are created
- **File watching** — Monitors `**/*.mist` for new files
### Diagnostic Remapping
When a transpilation error occurs in the `mist-analyzer`:
1. Parse errors are converted to `Diagnostic` with Mist source positions
2. Semantic errors (uninitialized class fields) use the stored line/column
3. Rust compiler errors are remapped via the `Mapping` system back to Mist positions
+76
View File
@@ -0,0 +1,76 @@
---
title: Parsing
description: PEG grammar structure, AST design, and how Mist source code is parsed.
icon: FileCode
---
The parser is built with [pest](https://pest.rs), a PEG parser generator. Grammar rules are defined in `grammar.pest` (693 rules).
### Key files
- `grammar.pest` — PEG grammar defining the entire language syntax
- `src/parser/common/` — Parse rule → AST conversions for expressions, statements, types, declarations
- `src/parser/items/` — Parse rule → AST conversions for top-level items (structs, enums, classes, functions, traits, impls, attributes)
- `src/ast/` — AST node types (expr.rs, statement.rs, top_level.rs)
- `src/error.rs` — Error types (PreAst parsing errors, Ast generation errors)
### Parsing entry points
```rust
// Parse a complete program
pub fn parse<'a>(source: &'a str) -> Result<Program, ParseError<'a>>
// Parse only the module declaration
pub fn parse_module<'a>(source: &'a str) -> Result<Option<(Visibility, Identifier)>, ParseError<'a>>
```
### Grammar Structure
The grammar follows a layered approach:
1. **Lexical rules** (silent) — `WHITESPACE`, `COMMENT`, `identifier`, `integer`, `float`, `string_lit`
2. **Primary expressions** — literals, paths, tuples, arrays, closures, control flow
3. **Term** — prefix operators + primary + postfix operators
4. **Expression** — terms joined by binary operators (via Pratt parser)
5. **Statements** — variable declarations, control flow (`if`, `while`, `for`, `match`, `loop`), blocks
6. **Top-level items** — functions, structs, enums, classes, traits, impls, type aliases, imports, module declarations, constants
### AST Structure
The AST preserves source positions via `Spanned<T>`:
```rust
pub struct Spanned<T> {
pub line: usize,
pub column: usize,
pub item: T,
}
```
Top-level items are wrapped as:
```rust
pub struct TopLevel(pub Spanned<TopLevelKind>, pub Vec<Attribute>);
```
Expressions use a fix-point representation for prefix/postfix operators:
```rust
Expression::Fix {
initial: Box<Expression>,
prefixes: Vec<Prefix>,
postfixes: Vec<Postfix>,
}
```
Binary expressions use Pratt parsing for correct precedence:
```rust
Expression::Binary {
lhs: Box<Expression>,
op: String,
rhs: Box<Expression>,
}
```
All operators are left-associative with a single precedence level.
@@ -0,0 +1,31 @@
---
title: Position Mapping
description: Bidirectional mapping between Mist source positions and Rust output positions for error remapping and LSP features.
icon: Map
---
Mist maintains a bidirectional mapping between Mist source positions and Rust output positions. This is essential for:
1. **Error remapping** — Rust compiler errors point to the correct Mist source location
2. **LSP features** — Go-to-definition, hover, and completion work from Mist source
### Data Structure
The mapping is stored as pairs:
```rust
pub struct Mapping {
pub mist_path: PathBuf,
pub map: HashSet<(RustMap, MistMap)>,
}
```
- `RustMap(usize, usize)` — line/column in generated Rust
- `MistMap(usize, usize)` — line/column in original Mist
### Mapping Lifecycle
1. **Codegen** — Each `Spanned<T>` AST node records its Mist position and the current Rust position in the codegen output buffer via `GenSpanTranslation`
2. **Persistence** — The mapping is serialized to `<output>.map.json` alongside the transpiled `.rs` output
3. **Build-time remapping** — The builder reads `.map.json` to remap `cargo` diagnostics back to Mist positions
4. **LSP remapping** — Both Mist→Rust and Rust→Mist direction queries are supported via `find()` and `find_by_mist()`
@@ -0,0 +1,36 @@
---
title: Semantic Analysis
description: Class field initialization verification and the GetMutability analysis system.
icon: SearchCheck
---
The semantic checker (`semantics.rs`) performs class field initialization analysis. When a class has a constructor, it verifies that every declared field is mutated (directly or indirectly via method calls) within the constructor body.
### Field Initialization
The primary semantic check ensures all class fields are initialized in the constructor:
```mist
class Player {
i32 health,
str& name,
pub constructor(str& name)
{
self.name = name;
// Error: field 'health' is uninitialized
}
}
```
### How It Works
The `GetMutability` trait tracks which identifiers are mutated:
1. Collects all identifiers that get `&mut` references
2. Tracks `self.field = value` patterns
3. Follows method calls that might initialize fields (transitively)
4. Ensures all conditional branches initialize the same fields (intersection semantics)
5. `super` assignments count for `_super` field initialization
If any field is uninitialized after the analysis, a `SemanticError` is reported with the field's source position.
+61
View File
@@ -0,0 +1,61 @@
---
title: Transpilation Pipeline
description: How Mist source files are discovered, transpiled to Rust, and cached.
icon: Repeat
---
The transpiler (`transpiler.mist` in `mist_api`) orchestrates the full pipeline.
### Pipeline
1. Read `Mist.toml` configuration
2. Build a `Module` tree from the filesystem (discovering `package.mist` files)
3. For each module:
a. Parse Mist source
b. Run semantic checks
c. Generate Rust code and position mapping
d. Write `.rs` file and `.map.json` file
4. Recursively transpile included crates
### Module Tree
The `Module` struct represents the file-to-module mapping:
```rust
pub class Module {
pub String name;
pub PathBuf path;
pub Vec<Module> children;
pub constructor(PathBuf mist_path, MistConfig& config) { ... }
pub bool is_package(&self) { ... }
pub PathBuf output_dir(&self, PathBuf& parent_dir) { ... }
pub PathBuf output_path(&self, PathBuf& parent_dir, ...) { ... }
}
```
### Transpilation Mapping Rules
| Mist Source | Rust Output |
|----------------------------|----------------------------------|
| `src/main.mist` | `.mist/src/main.rs` |
| `src/foo.mist` | `.mist/src/foo.rs` |
| `src/bar/package.mist` | `.mist/src/bar/mod.rs` |
| `src/bar/baz.mist` | `.mist/src/bar/baz.rs` |
A `package.mist` file generates `mod.rs` in the output directory and contains `pub mod <child>;` declarations for its children.
### Caching
The transpiler implements basic caching via file modification times:
```rust
fn is_source_newer(source: &Path, output: &Path) -> io::Result<bool> {
if !output.exists() { return Ok(true); }
let source_time = fs::metadata(source)?.modified()?;
let output_time = fs::metadata(output)?.modified()?;
Ok(source_time > output_time)
}
```
If a source file has not changed since the last transpilation, the `.rs` file is not regenerated.
+1 -1
View File
@@ -4,7 +4,7 @@ description: Understanding the Alpha state of Mist and our technical roadmap.
icon: TriangleAlert icon: TriangleAlert
--- ---
Mist is currently in a **Volatile Alpha** stage (latest: v0.3.7-alpha.0). Our current priority is exploring **Syntax and Features**. We believe in stabilizing the developer experience and the "feel" of the language before locking in the deep architectural logic of the compiler. Mist is currently in a **Volatile Alpha** stage (latest: v0.3.8-alpha.0). Our current priority is exploring **Syntax and Features**. We believe in stabilizing the developer experience and the "feel" of the language before locking in the deep architectural logic of the compiler.
The compiler, transpiler, and CLI are partially bootstrapped — written in Mist itself. This gives us real-world feedback on every language design decision. The compiler, transpiler, and CLI are partially bootstrapped — written in Mist itself. This gives us real-world feedback on every language design decision.
-115
View File
@@ -1,115 +0,0 @@
---
title: Control Flow
description: Directing execution with expression-based logic, pattern matching, and traditional loop structures.
icon: Split
---
Control flow in Mist provides a bridge between C-style procedural logic and Rust's expression-oriented design. Conditions do not require parentheses, and blocks support expression bodies.
## Conditionals
The `if` statement evaluates a boolean expression without parentheses:
```mist
if score > 50 {
println!("Pass");
} else if score == 50 {
println!("Borderline");
} else {
println!("Fail");
}
// Expression body (implicit return)
let result = if valid { "ok" } else { "err" };
```
## Match
The `match` statement provides exhaustive pattern matching with support for multiple patterns per arm via `|`:
```mist
match task_state {
TaskState::Pending => { println!("Queued"); }
TaskState::Failed { reason, code } => {
println!("Error {}: {}", code, reason);
}
TaskState::NotResponding | TaskState::Progress => {
draw_loading();
}
_ => { println!("Other state"); }
}
```
Patterns support destructuring, or-patterns, and wildcards:
```mist
let x = 2;
let result;
match x {
1 => { result = 10; }
2 => result = 20,
3 => { result = 30; }
_ => panic!();
}
```
## Loops
### Loop
An infinite loop construct:
```mist
loop {
println!("forever");
if done { break; }
}
```
### For-In Loop
For loops iterate over an expression using `for pattern in expr` syntax:
```mist
for i in 0 .. 4 {
sum += i;
}
// With pattern destructuring
for (k, _) in pairs {
keys += k;
}
// With range variable
let r = 0 .. 5;
for i in r {
count++;
}
```
### While Loop
```mist
while count < 5 {
count++;
}
while active {
wait_for_event();
}
```
## Jump Statements
- **`return`**: Exits the current function, optionally passing back a value.
- **`break`**: Terminates the innermost looping construct.
- **`continue`**: Skips the remainder of the current loop iteration.
## Key Characteristics
- **No Parentheses**: Conditions in `if`, `while`, and `match` do not require parentheses.
- **Implicit Returns**: Expression bodies implicitly return their value.
- **Pattern Integration**: Loops and match arms utilize Mist's pattern system for data destructuring.
- **Multiple Patterns**: Match arms support `|` for matching multiple patterns.
- **Expression `if`**: `if/else` blocks can be used as expressions.
-142
View File
@@ -1,142 +0,0 @@
---
title: Expressions
description: The building blocks of logic, from literals to complex postfix chains.
icon: Binary
---
Expressions in Mist are the fundamental units that evaluate to a value. The syntax follows a clean **prefix -> primary -> postfix** chain, providing a predictable structure.
## Primary Expressions
Primary expressions are the starting point of any logic chain. These include literal values, paths to members, tuples, arrays, and basic statements.
```mist
let x = 42;
let pi = Math::PI;
let coordinates = (10, 20, 30);
```
## Postfix Operations
Postfix expressions allow you to build on a primary value with field access, calls, indexing, type casting, error propagation, and mutation operators.
```mist
let len = list.length();
s.len();
s.to_uppercase();
let task = Task {
name: "Drafting",
priority: 1,
};
let first = items[0];
println!("Value: {}", first);
```
### Increment & Decrement
```mist
let mut i = 0;
i++;
i--;
```
### Compound Assignments
```mist
i += 10;
i -= 5;
i *= 2;
i /= 3;
value &= mask;
flags |= 0x01;
```
### Type Casting
Use `as` to convert between compatible types:
```mist
let x = 42;
let y = x as f64;
```
### Try Operator
Propagate errors with the `?` postfix operator:
```mist
let content = fs::read_to_string(path)?;
```
### Range Operators
Ranges use spaced `..` syntax:
```mist
0 .. 10 // exclusive range (0 to 9)
0 ..= 10 // inclusive range (0 to 10)
```
### Arrays
Arrays are initialized with brackets, with an optional repeat notation:
```mist
let arr = [1, 2, 3];
let zeros = [0; 10]; // ten zeroes
```
## Prefix Operations
Prefixes modify the primary expression that follows them — dereference, reference, negation, and logical not.
```mist
let mut value = 10;
let ref = &value;
let mref = &mut value;
let val = *ref;
let is_false = !true;
let neg = -42;
```
## Binary Operations
```mist
let sum = 10 + 20;
let is_equal = (x == y);
let complex = (a + b) * (c / d);
```
## Closures
Closures use arrow syntax with optional type annotations:
```mist
let add = (a, b) => a + b;
let greet = (name str&) => {
println!("Hello {}", name);
};
```
## Operator Table
| Category | Operators |
| -------------- | ---------------------------------------------------------------- |
| **Arithmetic** | `+`, `-`, `*`, `/`, `%` |
| **Comparison** | `==`, `!=`, `<`, `>`, `<=`, `>=` |
| **Logical** | `&&`, `||` |
| **Bitwise** | `<<`, `>>`, `&`, `\|`, `^` |
| **Range** | `..`, `..=` |
| **Assign** | `=`, `+=`, `-=`, `*=`, `/=`, `%=`, `&=`, `\|=`, `^=`, `<<=`, `>>=` |
## Key Characteristics
- **Predictable Chaining**: The `prefix* ~ primary ~ postfix*` grammar ensures complex expressions are parsed consistently.
- **Rust-Style References**: Expressions use `&` and `&mut` to create references, maintaining borrow checker compatibility.
- **Macro Integration**: Macros use `!` as a postfix operation.
- **Type Casting**: `as Type` provides explicit type conversion at the expression level.
- **Error Propagation**: The `?` operator enables early returns for `Result`/`Option` types.
- **Arrow Closures**: `(params) => expr` for concise anonymous functions.
-77
View File
@@ -1,77 +0,0 @@
---
title: Variables
description: Local state management with type inference and explicit mutability.
icon: Variable
---
Variables in Mist support two declaration styles: inferred typing with `let` and explicit type annotation. Like Rust, variables are immutable by default.
## Basic Declaration
Use `let` for automatic type inference:
```mist
let x = 42;
let greeting = "Hello Mist";
let s = "hello, world!";
```
## Explicit Typing
Type annotations are placed before the name:
```mist
i32 x = 42;
bool is_active = true;
str& name = "mist";
f64 pi = 3.14;
```
## Mutability
To allow a variable to be reassigned, use `let mut`:
```mist
let mut score = 0;
score = 100;
```
Or with explicit typing:
```mist
i32 mut counter = 0;
counter = 10;
```
## Strings
String references use `str&` for a natural left-to-right read:
```mist
str& name = "mist";
str& greeting = "Hello";
```
## Arrays
```mist
let list = [1, 2, 3]; // Standard init
let zeros = [0; 10]; // Repeat notation: ten zeroes
```
## Pattern Destructuring
Tuples are destructured using parentheses:
```mist
let (a, b) = (10, "hello");
let (a, (b, c)) = (1, (2, 3));
```
## Key Characteristics
- **Dual Declaration Styles**: `let` for inference, `Type name` for explicit typing.
- **Safety First**: Immutability by default prevents accidental state changes.
- **Zero-Cost Inference**: Type inference is handled entirely at compile time.
- **Shadowing**: Mist supports variable shadowing within the same scope.
- **`str&` Notation**: String references use postfix `&` for clear left-to-right reading.
+24 -15
View File
@@ -1,22 +1,31 @@
{ {
"pages": [ "pages": [
"---[Rocket]Introduction---", "---Introduction---",
"index", "index",
"philosophy", "philosophy",
"limitations", "limitations",
"---Language Guide---",
"---[Box]Components---", "guide/syntax-overview",
"components/functions", "guide/variables",
"components/structs", "guide/types",
"components/enums", "guide/functions",
"components/classes", "guide/control-flow",
"components/traits", "guide/structs-enums",
"components/pointers-references", "guide/classes",
"components/modules-imports", "guide/traits-impls",
"guide/generics",
"---[ArrowDownUp]Logic---", "guide/modules",
"logic/variables", "guide/patterns",
"logic/control-flow", "guide/operators",
"logic/expressions" "guide/attributes",
"---Compiler Internals---",
"internals/architecture",
"internals/parsing",
"internals/semantic-analysis",
"internals/codegen",
"internals/transpiler",
"internals/builder",
"internals/lsp",
"internals/position-mapping"
] ]
} }
+2 -40
View File
@@ -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. 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 ## Built for Low-Level and Embedded
Mist is designed from the ground up for systems where resources are constrained and control is required: 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. * **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. * **Zero-cost abstractions** — classes, traits, and generics all resolve at compile time.
* **Works with existing Cargo tooling** — use any Rust crate as a library. * **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 ## 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? ## 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. * **Safety:** Rust's borrow checker and type system under every expression, no exceptions.
* **Control:** Explicit types, explicit pointers, explicit allocation — nothing hidden. * **Control:** Explicit types, explicit pointers, explicit allocation — nothing hidden.
* **Ecosystem:** The entire Rust crate ecosystem available at your fingertips. * **Ecosystem:** The entire Rust crate ecosystem available at your fingertips.
+21
View File
@@ -0,0 +1,21 @@
let esmLoader;
module.exports = async function (source) {
if (!esmLoader) {
const mod = await import(
require('path').resolve(
__dirname,
'../node_modules/fumadocs-mdx/dist/webpack/mdx.js'
)
);
esmLoader = mod.default;
}
return new Promise((resolve, reject) => {
this.async = () => (err, result) => {
if (err) reject(err);
else resolve(result);
};
esmLoader.call(this, source);
});
};
+21
View File
@@ -0,0 +1,21 @@
let esmLoader;
module.exports = async function (source) {
if (!esmLoader) {
const mod = await import(
require('path').resolve(
__dirname,
'../node_modules/fumadocs-mdx/dist/webpack/meta.js'
)
);
esmLoader = mod.default;
}
return new Promise((resolve, reject) => {
this.async = () => (err, result) => {
if (err) reject(err);
else resolve(result);
};
esmLoader.call(this, source);
});
};
+30 -2
View File
@@ -1,10 +1,38 @@
import { createMDX } from 'fumadocs-mdx/next'; import { createMDX } from 'fumadocs-mdx/next';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const withMDX = createMDX(); const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = { const config = {
reactStrictMode: true, reactStrictMode: true,
}; };
export default withMDX(config); const nextConfig = withMDX(config);
const mdxLoaderPath = path.resolve(__dirname, 'loaders/fumadocs-mdx-loader.cjs');
const metaLoaderPath = path.resolve(__dirname, 'loaders/fumadocs-meta-loader.cjs');
if (nextConfig.turbopack?.rules) {
for (const rule of Object.values(nextConfig.turbopack.rules)) {
if (rule.loaders) {
for (const l of rule.loaders) {
if (l.loader === 'fumadocs-mdx/webpack/mdx') l.loader = mdxLoaderPath;
if (l.loader === 'fumadocs-mdx/webpack/meta') l.loader = metaLoaderPath;
}
}
}
}
const origWebpack = nextConfig.webpack;
nextConfig.webpack = (config, options) => {
config.resolveLoader ??= {};
config.resolveLoader.alias ??= {};
config.resolveLoader.alias['fumadocs-mdx/webpack/mdx'] = mdxLoaderPath;
config.resolveLoader.alias['fumadocs-mdx/webpack/meta'] = metaLoaderPath;
return origWebpack?.(config, options) ?? config;
};
export default nextConfig;
+188 -182
View File
@@ -10,10 +10,10 @@
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"fumadocs-core": "16.8.9", "fumadocs-core": "16.8.9",
"fumadocs-mdx": "15.0.2", "fumadocs-mdx": "^15.0.13",
"fumadocs-ui": "16.8.9", "fumadocs-ui": "16.8.9",
"lucide-react": "^1.14.0", "lucide-react": "^1.14.0",
"next": "16.2.6", "next": "^16.2.10",
"react": "^19.2.6", "react": "^19.2.6",
"react-dom": "^19.2.6", "react-dom": "^19.2.6",
"tailwind-merge": "^3.5.0" "tailwind-merge": "^3.5.0"
@@ -53,9 +53,9 @@
} }
}, },
"node_modules/@esbuild/aix-ppc64": { "node_modules/@esbuild/aix-ppc64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",
"integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -69,9 +69,9 @@
} }
}, },
"node_modules/@esbuild/android-arm": { "node_modules/@esbuild/android-arm": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",
"integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -85,9 +85,9 @@
} }
}, },
"node_modules/@esbuild/android-arm64": { "node_modules/@esbuild/android-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",
"integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -101,9 +101,9 @@
} }
}, },
"node_modules/@esbuild/android-x64": { "node_modules/@esbuild/android-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",
"integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -117,9 +117,9 @@
} }
}, },
"node_modules/@esbuild/darwin-arm64": { "node_modules/@esbuild/darwin-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",
"integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -133,9 +133,9 @@
} }
}, },
"node_modules/@esbuild/darwin-x64": { "node_modules/@esbuild/darwin-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",
"integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -149,9 +149,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-arm64": { "node_modules/@esbuild/freebsd-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",
"integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -165,9 +165,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-x64": { "node_modules/@esbuild/freebsd-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",
"integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -181,9 +181,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm": { "node_modules/@esbuild/linux-arm": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",
"integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -197,9 +197,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm64": { "node_modules/@esbuild/linux-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",
"integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -213,9 +213,9 @@
} }
}, },
"node_modules/@esbuild/linux-ia32": { "node_modules/@esbuild/linux-ia32": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",
"integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -229,9 +229,9 @@
} }
}, },
"node_modules/@esbuild/linux-loong64": { "node_modules/@esbuild/linux-loong64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",
"integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",
"cpu": [ "cpu": [
"loong64" "loong64"
], ],
@@ -245,9 +245,9 @@
} }
}, },
"node_modules/@esbuild/linux-mips64el": { "node_modules/@esbuild/linux-mips64el": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",
"integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",
"cpu": [ "cpu": [
"mips64el" "mips64el"
], ],
@@ -261,9 +261,9 @@
} }
}, },
"node_modules/@esbuild/linux-ppc64": { "node_modules/@esbuild/linux-ppc64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",
"integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -277,9 +277,9 @@
} }
}, },
"node_modules/@esbuild/linux-riscv64": { "node_modules/@esbuild/linux-riscv64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",
"integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -293,9 +293,9 @@
} }
}, },
"node_modules/@esbuild/linux-s390x": { "node_modules/@esbuild/linux-s390x": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",
"integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@@ -309,9 +309,9 @@
} }
}, },
"node_modules/@esbuild/linux-x64": { "node_modules/@esbuild/linux-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",
"integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -325,9 +325,9 @@
} }
}, },
"node_modules/@esbuild/netbsd-arm64": { "node_modules/@esbuild/netbsd-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",
"integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -341,9 +341,9 @@
} }
}, },
"node_modules/@esbuild/netbsd-x64": { "node_modules/@esbuild/netbsd-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",
"integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -357,9 +357,9 @@
} }
}, },
"node_modules/@esbuild/openbsd-arm64": { "node_modules/@esbuild/openbsd-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",
"integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -373,9 +373,9 @@
} }
}, },
"node_modules/@esbuild/openbsd-x64": { "node_modules/@esbuild/openbsd-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",
"integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -389,9 +389,9 @@
} }
}, },
"node_modules/@esbuild/openharmony-arm64": { "node_modules/@esbuild/openharmony-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",
"integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -405,9 +405,9 @@
} }
}, },
"node_modules/@esbuild/sunos-x64": { "node_modules/@esbuild/sunos-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",
"integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -421,9 +421,9 @@
} }
}, },
"node_modules/@esbuild/win32-arm64": { "node_modules/@esbuild/win32-arm64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",
"integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -437,9 +437,9 @@
} }
}, },
"node_modules/@esbuild/win32-ia32": { "node_modules/@esbuild/win32-ia32": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",
"integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -453,9 +453,9 @@
} }
}, },
"node_modules/@esbuild/win32-x64": { "node_modules/@esbuild/win32-x64": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",
"integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1126,15 +1126,15 @@
} }
}, },
"node_modules/@next/env": { "node_modules/@next/env": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/env/-/env-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/env/-/env-16.2.10.tgz",
"integrity": "sha512-gd8HoHN4ufj73WmR3JmVolrpJR47ILK6LouP5xElPglaVxir6e1a7VzvTvDWkOoPXT9rkkTzyCxBu4yeZfZwcw==", "integrity": "sha512-zLPxg9M0MEHmygpj5OuxjQ+vHMiy/K7cSp74G8ecYolmgUWw0RwN02tF56npup/+qaI8JB97hQgS/r2Hb6QwVA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@next/swc-darwin-arm64": { "node_modules/@next/swc-darwin-arm64": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.2.10.tgz",
"integrity": "sha512-ZJGkkcNfYgrrMkqOdZ7zoLa1TOy0qpcMfk/z4Mh/FKUz40gVO+HNQWqmLxf67Z5WB64DRp0dhEbyHfel+6sJUg==", "integrity": "sha512-v9IdJCa0H0mbo+8z5zwUpOk1Vj7RjkcI5uNYf5Ws1y6szf/p3Mzl9hLaST8SCt6L9h8NGnruZcd2+o0NTNwDhA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1148,9 +1148,9 @@
} }
}, },
"node_modules/@next/swc-darwin-x64": { "node_modules/@next/swc-darwin-x64": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.2.10.tgz",
"integrity": "sha512-v/YLBHIY132Ced3puBJ7YJKw1lqsCrgcNo2aRJlCEyQrrCeRJlvGlnmxhPxNQI3KE3N1DN5r9TPNPvka3nq5RQ==", "integrity": "sha512-17IS0jJRViROGmA9uGdNR8VPJpfbnaVG7E9qhso5jDLkmyd0lSDORWxbcKINzcFqzZqGwGtMSnrFRxBpuUYjLQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1164,9 +1164,9 @@
} }
}, },
"node_modules/@next/swc-linux-arm64-gnu": { "node_modules/@next/swc-linux-arm64-gnu": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.2.10.tgz",
"integrity": "sha512-RPOvqlYBbcQjkz9VQQDZ2T2bARIjXZV1KFlt+V2Mr6SW/e4I9fcKsaA0hdyf2FHoTlsV2xnBd5Y912rP/1Ce6w==", "integrity": "sha512-GRQRsRtuciNJvB54AvvuQTiq0oZtFwa1owQqtZD8wwnGpM2L39MV22kpI72YSXLKIyY40LC66EiLFv4PiicXxg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1183,9 +1183,9 @@
} }
}, },
"node_modules/@next/swc-linux-arm64-musl": { "node_modules/@next/swc-linux-arm64-musl": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.2.10.tgz",
"integrity": "sha512-URUTu1+dMkxJsPFgm+OeEvq9wf5sujw0EvgYy80TDGHTSLTnIHeqb0Eu8A3sC95IRgjejQL+kC4mw+4yPxiAXA==", "integrity": "sha512-zkN9MQYS7UQBro+FnISUq1itaQjXI9xqISzuQ+2bc921NcJ1x4yPCqrn77tVN6/dOOXaaWVX3k6/bR07pPwK+A==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1202,9 +1202,9 @@
} }
}, },
"node_modules/@next/swc-linux-x64-gnu": { "node_modules/@next/swc-linux-x64-gnu": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.2.10.tgz",
"integrity": "sha512-DOj182mPV8G3UkrayLoREM5YEYI+Dk5wv7Ox9xl1fFibAELEsFD0lDPfHIeILlutMMfdyhlzYPELG3peuKaurw==", "integrity": "sha512-iCVJnwvrPYECvA6WM/7+oo+OiTvedIKLxtCLAZP4xZR3nXa1zmzZyLPbYCmWvpd4CvMYF1EMTafd0ii3DygLvA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1221,9 +1221,9 @@
} }
}, },
"node_modules/@next/swc-linux-x64-musl": { "node_modules/@next/swc-linux-x64-musl": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.2.10.tgz",
"integrity": "sha512-HKQ5SP/V/ub73UvF7n/zeJlxk2kLmtL7Wzrg4WfmkjmNos5onJ2tKu7yZOPdL18A6Svfn3max29ym+ry7NkK4g==", "integrity": "sha512-ov2g4H0dHY9bPoOU83m91hWT7Iq5qy13bUnyyshLU3HGR1Ownn0X9QpmDPc5iIUaahTp7f7LeGAhV4DSFtackw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1240,9 +1240,9 @@
} }
}, },
"node_modules/@next/swc-win32-arm64-msvc": { "node_modules/@next/swc-win32-arm64-msvc": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.2.10.tgz",
"integrity": "sha512-LZXpTlPyS5v7HhSmnvsLGP3iIYgYOBnc8r8ArlT55sGHV89bR2HlDdBjWQ+PY6SJMmk8TuVGFuxalnP3k/0Dwg==", "integrity": "sha512-DwAnhLX76HQiFFQNgWlcK+JzlnD1rZ+UK/WY0ZMI/deXpvgnesjNYrqcfo1JzBuz4Kf7o3brIBL0glI1junatA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1256,9 +1256,9 @@
} }
}, },
"node_modules/@next/swc-win32-x64-msvc": { "node_modules/@next/swc-win32-x64-msvc": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.2.6.tgz", "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.2.10.tgz",
"integrity": "sha512-F0+4i0h9J6C4eE3EAPWsoCk7UW/dbzOjyzxY0qnDUOYFu6FFmdZ6l97/XdV3/Nz3VYyO7UWjyEJUXkGqcoXfMA==", "integrity": "sha512-0JXq3b85Jk9Jg4ntLUbXSPvoDw3gpZou7twuKdoFG2jOw635v7+IiXfTaa0TxVMyx78pUjnrVYwLgjKfX4e6/A==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2915,9 +2915,9 @@
} }
}, },
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.28.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",
"integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@@ -2927,32 +2927,32 @@
"node": ">=18" "node": ">=18"
}, },
"optionalDependencies": { "optionalDependencies": {
"@esbuild/aix-ppc64": "0.28.0", "@esbuild/aix-ppc64": "0.28.1",
"@esbuild/android-arm": "0.28.0", "@esbuild/android-arm": "0.28.1",
"@esbuild/android-arm64": "0.28.0", "@esbuild/android-arm64": "0.28.1",
"@esbuild/android-x64": "0.28.0", "@esbuild/android-x64": "0.28.1",
"@esbuild/darwin-arm64": "0.28.0", "@esbuild/darwin-arm64": "0.28.1",
"@esbuild/darwin-x64": "0.28.0", "@esbuild/darwin-x64": "0.28.1",
"@esbuild/freebsd-arm64": "0.28.0", "@esbuild/freebsd-arm64": "0.28.1",
"@esbuild/freebsd-x64": "0.28.0", "@esbuild/freebsd-x64": "0.28.1",
"@esbuild/linux-arm": "0.28.0", "@esbuild/linux-arm": "0.28.1",
"@esbuild/linux-arm64": "0.28.0", "@esbuild/linux-arm64": "0.28.1",
"@esbuild/linux-ia32": "0.28.0", "@esbuild/linux-ia32": "0.28.1",
"@esbuild/linux-loong64": "0.28.0", "@esbuild/linux-loong64": "0.28.1",
"@esbuild/linux-mips64el": "0.28.0", "@esbuild/linux-mips64el": "0.28.1",
"@esbuild/linux-ppc64": "0.28.0", "@esbuild/linux-ppc64": "0.28.1",
"@esbuild/linux-riscv64": "0.28.0", "@esbuild/linux-riscv64": "0.28.1",
"@esbuild/linux-s390x": "0.28.0", "@esbuild/linux-s390x": "0.28.1",
"@esbuild/linux-x64": "0.28.0", "@esbuild/linux-x64": "0.28.1",
"@esbuild/netbsd-arm64": "0.28.0", "@esbuild/netbsd-arm64": "0.28.1",
"@esbuild/netbsd-x64": "0.28.0", "@esbuild/netbsd-x64": "0.28.1",
"@esbuild/openbsd-arm64": "0.28.0", "@esbuild/openbsd-arm64": "0.28.1",
"@esbuild/openbsd-x64": "0.28.0", "@esbuild/openbsd-x64": "0.28.1",
"@esbuild/openharmony-arm64": "0.28.0", "@esbuild/openharmony-arm64": "0.28.1",
"@esbuild/sunos-x64": "0.28.0", "@esbuild/sunos-x64": "0.28.1",
"@esbuild/win32-arm64": "0.28.0", "@esbuild/win32-arm64": "0.28.1",
"@esbuild/win32-ia32": "0.28.0", "@esbuild/win32-ia32": "0.28.1",
"@esbuild/win32-x64": "0.28.0" "@esbuild/win32-x64": "0.28.1"
} }
}, },
"node_modules/escape-string-regexp": { "node_modules/escape-string-regexp": {
@@ -3222,31 +3222,30 @@
} }
}, },
"node_modules/fumadocs-mdx": { "node_modules/fumadocs-mdx": {
"version": "15.0.2", "version": "15.0.13",
"resolved": "https://registry.npmjs.org/fumadocs-mdx/-/fumadocs-mdx-15.0.2.tgz", "resolved": "https://registry.npmjs.org/fumadocs-mdx/-/fumadocs-mdx-15.0.13.tgz",
"integrity": "sha512-lM8g8uoAY6MmBkBYNBnhU2phY8RrajttCbqi+tOXrBW620VT9Cd846uJvfQN6vcP5ieBvcsYv3BXIEZq+QCRGw==", "integrity": "sha512-VsGhCiLriXXMzm3WbgrVP7t6LvOthwh1BC+IGSI1ZW63UcSo1jE4aAiuUrTIF0jv1EGQkJG8cPsy0cOnf4sejA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mdx-js/mdx": "^3.1.1", "@mdx-js/mdx": "^3.1.1",
"@standard-schema/spec": "^1.1.0", "@standard-schema/spec": "^1.1.0",
"chokidar": "^5.0.0", "chokidar": "^5.0.0",
"esbuild": "^0.28.0", "esbuild": "^0.28.1",
"estree-util-value-to-estree": "^3.5.0", "estree-util-value-to-estree": "^3.5.0",
"js-yaml": "^4.1.1", "js-yaml": "^5.1.0",
"mdast-util-mdx": "^3.0.0", "mdast-util-mdx": "^3.0.0",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"picomatch": "^4.0.4", "picomatch": "^4.0.4",
"tinyexec": "^1.1.2", "tinyexec": "^1.2.4",
"tinyglobby": "^0.2.16", "tinyglobby": "^0.2.17",
"unified": "^11.0.5", "unified": "^11.0.5",
"unist-util-remove-position": "^5.0.0", "unist-util-remove-position": "^5.0.0",
"unist-util-visit": "^5.1.0", "unist-util-visit": "^5.1.0",
"vfile": "^6.0.3", "vfile": "^6.0.3",
"vitefu": "^1.1.3",
"zod": "^4.4.3" "zod": "^4.4.3"
}, },
"bin": { "bin": {
"fumadocs-mdx": "dist/bin.js" "fumadocs-mdx": "bin.js"
}, },
"peerDependencies": { "peerDependencies": {
"@types/mdast": "*", "@types/mdast": "*",
@@ -3256,6 +3255,7 @@
"mdast-util-directive": "*", "mdast-util-directive": "*",
"next": "^15.3.0 || ^16.0.0", "next": "^15.3.0 || ^16.0.0",
"react": "^19.2.0", "react": "^19.2.0",
"rolldown": "*",
"vite": "7.x.x || 8.x.x" "vite": "7.x.x || 8.x.x"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
@@ -3277,11 +3277,36 @@
"react": { "react": {
"optional": true "optional": true
}, },
"rolldown": {
"optional": true
},
"vite": { "vite": {
"optional": true "optional": true
} }
} }
}, },
"node_modules/fumadocs-mdx/node_modules/js-yaml": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.1.tgz",
"integrity": "sha512-zfLtNfQqxVqq3uaTqSkh4x4hZw3KHobGUA0fJUj4wawW8bsQLTVqpHdXSIzidh7o+4lEW36tANuAGdaFx6Zgnw==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
},
"bin": {
"js-yaml": "bin/js-yaml.mjs"
}
},
"node_modules/fumadocs-ui": { "node_modules/fumadocs-ui": {
"version": "16.8.9", "version": "16.8.9",
"resolved": "https://registry.npmjs.org/fumadocs-ui/-/fumadocs-ui-16.8.9.tgz", "resolved": "https://registry.npmjs.org/fumadocs-ui/-/fumadocs-ui-16.8.9.tgz",
@@ -5029,12 +5054,12 @@
} }
}, },
"node_modules/next": { "node_modules/next": {
"version": "16.2.6", "version": "16.2.10",
"resolved": "https://registry.npmjs.org/next/-/next-16.2.6.tgz", "resolved": "https://registry.npmjs.org/next/-/next-16.2.10.tgz",
"integrity": "sha512-qOVgKJg1+At15NpeUP+eJgCHvTCgXsogweq87Ri/Ix7PkqQHg4sdaXmSFqKlgaIXE4kW0g25LE68W87UANlHtw==", "integrity": "sha512-2som5AVXb3kE6Yjine3/mNbBayYF58eguBWIVVUdr1y/L426xyVEgYxgBG+1QC34P2x5E+tcDup6XkuOAX3dCA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@next/env": "16.2.6", "@next/env": "16.2.10",
"@swc/helpers": "0.5.15", "@swc/helpers": "0.5.15",
"baseline-browser-mapping": "^2.9.19", "baseline-browser-mapping": "^2.9.19",
"caniuse-lite": "^1.0.30001579", "caniuse-lite": "^1.0.30001579",
@@ -5048,14 +5073,14 @@
"node": ">=20.9.0" "node": ">=20.9.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"@next/swc-darwin-arm64": "16.2.6", "@next/swc-darwin-arm64": "16.2.10",
"@next/swc-darwin-x64": "16.2.6", "@next/swc-darwin-x64": "16.2.10",
"@next/swc-linux-arm64-gnu": "16.2.6", "@next/swc-linux-arm64-gnu": "16.2.10",
"@next/swc-linux-arm64-musl": "16.2.6", "@next/swc-linux-arm64-musl": "16.2.10",
"@next/swc-linux-x64-gnu": "16.2.6", "@next/swc-linux-x64-gnu": "16.2.10",
"@next/swc-linux-x64-musl": "16.2.6", "@next/swc-linux-x64-musl": "16.2.10",
"@next/swc-win32-arm64-msvc": "16.2.6", "@next/swc-win32-arm64-msvc": "16.2.10",
"@next/swc-win32-x64-msvc": "16.2.6", "@next/swc-win32-x64-msvc": "16.2.10",
"sharp": "^0.34.5" "sharp": "^0.34.5"
}, },
"peerDependencies": { "peerDependencies": {
@@ -5757,18 +5782,18 @@
} }
}, },
"node_modules/tinyexec": { "node_modules/tinyexec": {
"version": "1.1.2", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.2.tgz", "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz",
"integrity": "sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==", "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=18" "node": ">=18"
} }
}, },
"node_modules/tinyglobby": { "node_modules/tinyglobby": {
"version": "0.2.16", "version": "0.2.17",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
"integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"fdir": "^6.5.0", "fdir": "^6.5.0",
@@ -6027,25 +6052,6 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/vitefu": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz",
"integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==",
"license": "MIT",
"workspaces": [
"tests/deps/*",
"tests/projects/*",
"tests/projects/workspace/packages/*"
],
"peerDependencies": {
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
},
"peerDependenciesMeta": {
"vite": {
"optional": true
}
}
},
"node_modules/web-namespaces": { "node_modules/web-namespaces": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",
+2 -2
View File
@@ -11,10 +11,10 @@
}, },
"dependencies": { "dependencies": {
"fumadocs-core": "16.8.9", "fumadocs-core": "16.8.9",
"fumadocs-mdx": "15.0.2", "fumadocs-mdx": "^15.0.13",
"fumadocs-ui": "16.8.9", "fumadocs-ui": "16.8.9",
"lucide-react": "^1.14.0", "lucide-react": "^1.14.0",
"next": "16.2.6", "next": "^16.2.10",
"react": "^19.2.6", "react": "^19.2.6",
"react-dom": "^19.2.6", "react-dom": "^19.2.6",
"tailwind-merge": "^3.5.0" "tailwind-merge": "^3.5.0"
+1 -1
View File
@@ -5,7 +5,7 @@ import {
} from "fumadocs-mdx/config"; } from "fumadocs-mdx/config";
import { metaSchema, pageSchema } from "fumadocs-core/source/schema"; import { metaSchema, pageSchema } from "fumadocs-core/source/schema";
import { z } from "zod"; import { z } from "zod";
import mist from "./public/mist.tmLanguage.json"; import mist from "@/components/mist.tmLanguage.json";
// You can customize Zod schemas for frontmatter and `meta.json` here // You can customize Zod schemas for frontmatter and `meta.json` here
// see https://fumadocs.dev/docs/mdx/collections // see https://fumadocs.dev/docs/mdx/collections
+1 -1
View File
@@ -173,7 +173,7 @@ export default function HomePage() {
return ( return (
<div className="h-[calc(100vh-58px)] overflow-auto snap-y snap-mandatory scroll-smooth no-scrollbar relative flex flex-col xl:flex-row"> <div className="h-[calc(100vh-58px)] overflow-auto snap-y snap-mandatory scroll-smooth no-scrollbar relative flex flex-col xl:flex-row">
<div className="hidden pointer-events-none sticky top-0 right-0 z-50 md:flex order-first xl:order-last w-full xl:w-[40vw] h-svh items-center justify-center p-10 no-scrollbar"> <div className="hidden pointer-events-none sticky top-0 right-0 z-50 xl:flex order-first xl:order-last w-full xl:w-[40vw] h-svh items-center justify-center p-10 no-scrollbar">
<div className="w-full max-w-2xl overflow-hidden no-scrollbar"> <div className="w-full max-w-2xl overflow-hidden no-scrollbar">
<motion.div <motion.div
className="will-change-transform transform-gpu w-full h-auto border border-fd-border p-5 rounded-xl min-h-24 backdrop-blur bg-black dark:bg-black/20 pointer-events-auto" className="will-change-transform transform-gpu w-full h-auto border border-fd-border p-5 rounded-xl min-h-24 backdrop-blur bg-black dark:bg-black/20 pointer-events-auto"
+1 -1
View File
@@ -3,7 +3,7 @@
import { BundledLanguage, codeToTokens, createHighlighter } from "shiki"; import { BundledLanguage, codeToTokens, createHighlighter } from "shiki";
import { motion, AnimatePresence } from "framer-motion"; import { motion, AnimatePresence } from "framer-motion";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import mist from "../../public/mist.tmLanguage.json"; import mist from "@/components/mist.tmLanguage.json";
interface Props { interface Props {
code: string; code: string;