Docs
Modules and std
Import, export, std, runtime.
Import / export
/ std/io ; binds io
/ ./lib ; binds lib
io.print(lib.message)
\ name ; export
\ a, b ; multi export
Rules
Each import binds the last path segment as one module name. Use module.export. No star-import. io.print accepts strings; convert other values explicitly through modules such as std/str. There is no free print; use std. / runtime is allowed only in privileged std sources. An imported function whose defining module has a known return kind types that way at the importer (str.from_int is a string, so str.from_int(1) + 1 is a kind mismatch). Import parameters stay unspecialized: one call site does not freeze later argument kinds.
Files and folders
A relative path resolves to a matching .echo file or a directory module. A directory module includes its sorted *.echo files and exposes the union of their exports. Private names remain file-local; imports only see exported names.
External packages
Host-style imports resolve from the user package cache. xo get installs a package, xo home prints the cache locations, and an optional xo.toml pins dependencies for check, run, and build.
xo get github.com/owner/package@v1.2.3
xo get local-package --path ./local-package
xo home