Pkg
Stof package format ("pkg").
Importing a Directory/Project
Example Project Directory
import: "point"#[type]
GeoPoint: {
float x: 0;
float y: 0;
fn length() -> float {
Num.sqrt(self.x.pow(2) + self.y.pow(2))
}
}Importing the Example Directory
import pkg "@geo"; // looks at "stof/geo/pkg.stof" and imports "import" field path
#[main]
fn main() {
const point = new GeoPoint { x: 2, y: 2 };
// work with point
}Importing the Pkg File
Creating a Pkg File
Importing a Pkg File
Last updated