Tooling

Foundation and standard library

Know when to use @std and when you are looking at lower-level foundation names.

What

Most user code starts in @std. musi:* is the lower-level family when you need foundation-level capabilities.

Why

Keeping both namespaces explicit makes the dependency model visible:

  • @std for everyday work
  • musi:* for core-level operations

How

Import from @std modules first, then layer musi:* only where the project surface needs it.

let configured := Option.some[Int](8080);
Option.unwrap_or[Int](configured, 3000);
let parsed := Result.ok[Int, String](8080);
Result.unwrap_or[Int, String](parsed, 3000);

Compare

Import the standard library, then reach the family you need. Musi keeps stdlib access explicit through @std.

Musi package imports are values, so @std becomes a normal binding you can pass around.

let Std := import "@std";
let Option := Std.Option;

When

Use @std for normal application logic. Use musi:* for boundary-focused tooling and low-level integration tasks.

Analogy

Like choosing a standard library versus runtime SDK in other ecosystems.

Try it

Move one project import to @std, then continue to Testing and running.