Core language
Imports and packages
Import modules and use the main namespace families.
What
Imports let you pull shared code into the current file: standard features from @std and lower-level building blocks from musi:* when needed.
Why
This keeps code short and reusable while avoiding copy-paste or duplicated helpers.
How
Add imports at the top of your file, then use imported names directly in regular expressions.
Compare
import java.util.Optional;let Std := import "@std";
let Option := Std.Option;use std::option::Option;import { readFileSync } from "node:fs";When
Use imports in most new files.
- Start with
@stdfor everyday tasks. - Use
musi:*for boundary-level interoperability and foundation-level work.
Analogy
Like Python imports or TypeScript module imports: one place for shared functionality, one place for lower-level tools.
Try it
Replace duplicated snippets with imported names, then continue to Data and pattern matching.
github.com/musi-lang/musi
musi-lang.com