Skip to content

Complete the Wave module import system - #344

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
LunaStev:feat/import-system-v021
Aug 23, 2026
Merged

Complete the Wave module import system#344
LunaStev merged 1 commit into
wavefnd:masterfrom
LunaStev:feat/import-system-v021

Conversation

@LunaStev

Copy link
Copy Markdown
Member

Summary

  • replace flat source inclusion with a module graph supporting package roots, package submodules, local aliases, selective imports, and explicit public re-exports
  • enforce declaration visibility across module boundaries, reject pub fun main(), and keep entry points private
  • diagnose private access, namespace conflicts, import cycles, and package-root escapes while mangling imported definitions safely
  • support inferred var initializers and empty-struct construction used by the documented import examples
  • migrate the standard library, examples, and regression fixtures to the explicit module contract

Package contract

  • import("add") resolves the Vex package root src/lib.wave
  • import("add::math") resolves src/math.wave
  • import("./helpers" as helpers) creates a local alias
  • import("add")::{sum, Point} imports only public symbols

Validation

  • cargo fmt --all --check
  • cargo check --locked --jobs 2
  • cargo test --locked --jobs 2 (39 root tests passed)
  • cargo test -p parser --locked --jobs 2 (6 parser tests passed)
  • RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps --jobs 2
  • cargo clippy --locked --all-targets --jobs 2 -- -D warnings
  • ./tools/check_std_policy.sh
  • full language suite: 100 passed, 8 platform skips, 0 failed
  • path and local Git Vex dependency end-to-end checks

Companion change

Signed-off-by: LunaStev <luna@lunastev.org>
@LunaStev
LunaStev merged commit cf6943c into wavefnd:master Aug 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant