Updated docs to new version

This commit is contained in:
2026-07-12 07:55:13 -04:00
parent 59fec35aea
commit b419a1c7c7
7 changed files with 79 additions and 23 deletions
+18 -1
View File
@@ -1,6 +1,6 @@
---
title: Modules & Imports
description: Module declarations, imports, re-exports, and module resolution rules.
description: Module declarations, imports, re-exports, include directives, and module resolution rules.
icon: FolderTree
---
@@ -18,6 +18,23 @@ use std::collections::HashMap;
pub use my_module::MyType;
```
### Include Directives
Mist supports C-style include directives for importing external files and crates:
```mist
// Global include (C-style)
#include <stdio.h>
// Use include (import from crate)
pub use my_crate::my_module;
// Local include (import from relative path)
#include "my_local_module.mist"
```
Include directives allow you to bring in external code without using the module system, which is useful for C interop and local file organization.
### Module Resolution
Mist maps the module tree to Rust's module system: