XU XUv0.16.0

Structure

A directory is a package: #util loads util/*.xu (not recursive), else util.xu. One package per directory. Only the project directory may use @main. Export with pub.

#path is file-scoped: declarations are package-wide, but each file must import to use qualified names.

Platform sources use header tags $macos / $linux / $windows / $unix / $freestanding, not _linux.xu suffixes. $freestanding specifies unhosted baremetal sources severed from host OS syscalls and libc.

Top level allows only: package decl and $ tags, attributes (such as #[no_mangle], #[naked], @repr(…)), # imports, const, struct/struct@/enum, fn. Module-level const declarations must appear after imports and strictly above fn, struct, enum, interface, impl, and module let declarations (enforced in Xu 0.16.0+). No mutable top-level globals outside modules' explicit bindings, no top-level statements.

Package declarations and imports use slash paths: @team/util, #net/http. Domain paths preserve dots and use quoted declarations such as @"example.com/team/my-lib"; imports require an explicit alias. A directory project requires xu.xun; module identity and package identity are distinct.

Module manifests and dependencies