Skip to content

Add a multi-file modules and imports example #657

Closed

Description

@LunaStev

Why

Wave documents local modules, aliases, selective imports, public declarations, and re-exports, but the maintained examples do not provide a small runnable multi-file program showing how those pieces fit together.

A contributor currently has to infer the intended module layout from compiler tests or documentation snippets.

Scope

Add a self-contained multi-file example under examples/ using only local modules.

The example should include:

  • a main.wave entry point;
  • at least one local helper module imported with ./...;
  • a namespaced import using an alias;
  • a selective import of public symbols;
  • a small facade module using pub import to re-export a symbol.

Keep the program focused on module behavior. Do not introduce a Vex package dependency or require network access.

Completion criteria

  • wavec run executes the entry-point program successfully.
  • Every .wave source in the example also passes wavec check when discovered independently by the corpus checker.
  • Private declarations remain inaccessible across module boundaries while the public declarations used by the example resolve correctly.
  • The example is documented in the examples index or its local README.
  • The program stays small enough to serve as a module/import reference rather than an application demo.

Activity

  1. added
    documentation
    good first issue
    needs testing
    on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationgood first issueneeds testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions