We are all living in cages with the door wide open.
— George Lucas
Modules
NAME wyzer-modules - Code organization and visibility
DESCRIPTION Wyzer uses a filesystem-based module system. Every source file is implicitly a module.
SYNOPSIS: FILES AS MODULES
// math.wyz
pub fn add(a: u32, b: u32) -> u32 {
a + b
}
// main.wyz
import math;
fn main() {
let sum = math::add(5, 10);
}
MODULE DETAILS
pub: Marks an item as publicly accessible outside the defining module.import: Brings a module into the current namespace.::: Namespace resolution operator.
SYNOPSIS: DIRECTORY MODULES
mod.wyz: A file namedmod.wyzinside a directory acts as the entry point for that directory module, aggregating submodules.