Skip to content

Imports and Modules

Modules organize code into reusable parts.

math.nubo:

fn add(a int, b int) -> int {
return a + b
}
fn subtract(a int, b int) -> int {
return a - b
}

Import by module name or filename:

import math from "math"
println(math.add(1, 2)) // Outputs: 3

Standard modules start with @std/ and provide extra features, like:

  • io
  • json
  • log
  • math
  • thread