Skip to content

std/prelude

std/prelude re-exports common functions and types from multiple std modules.

The prelude pulls in APIs from:

  • std/io
  • std/string
  • std/process
  • std/fs
  • std/path
  • std/error
  • std/math
  • std/convert

std/prelude re-exports functions such as:

println(s: String) Void
printInt(i: Int) Void
cwd() String
join(a: String, b: String) String
toString(x: Int) String
import "std/prelude" { println, printInt, cwd, join };
fun main() Int {
println(cwd());
println(join("/tmp", "zap.txt"));
printInt(42);
return 0;
}