Skip to content

Standard Library Boundary Lint

Janus now ships janus lint --stdlib-boundaries.

The command enforces the standard library border:

  • std.mem is for raw address and byte operations.
  • std.alloc is for allocation and ownership.
  • std.conv is for value conversion.

Phase 7 also moves the page allocator compatibility surface from std.mem to std.alloc. Use std.alloc.page_allocator and std.alloc.legacy_allocator for the remaining three-method compatibility surface. New allocator work should prefer std.alloc.trait.Allocator.

std.mem remains the home for reinterpret, realign, pointer_from, address_of, and copy_bytes. It does not re-export allocator modules.

The build step check-stdlib-boundaries runs the lint, and ./scripts/zb test depends on it.