Hello, world
Create, build, and run your first insty program with the cloud package manager.
Start a project
cloud init scaffolds a new project (it will ask what kind โ pick executable):
cloud init hello
cd hello You get a config.toml and src/main.ins:
module main
fun main() -> i32 {
@println("Hello from insty!")
return 0
} Build and run
cloud run cloud invokes the compiler, links an executable, and runs it. To build without running:
cloud build Compile a file directly
You can also skip cloud and call the compiler on a single file:
insty src/main.ins -o hello
./hello What just happened
- Every program starts from a
moduleand amainfunction returningi32. @printlnis a built-in, syscall-backed console helper (no libc required).- Variables are explicitly typed (
i32 count = 0); functions usefun name(args) -> type.
Next: take the language tour.