You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a focused pointers and fixed arrays example #659
documentationIssues or enhancements related to the documentation.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
Pointers, address-of expressions, deref, fixed-size arrays, and pointer parameters are fundamental Wave features, but the current examples only show them as pieces of larger programs such as struct_proto_semantics.wave, game.wave, and the WebAssembly smoke modules.
A smaller example would make the supported pointer/array model easier to understand without requiring readers to extract it from unrelated code.
Scope
Add a focused runnable example under examples/ that demonstrates:
taking the address of a variable with &;
declaring and passing ptr<T> values;
reading and modifying a value through deref;
declaring and indexing a fixed-size array<T, N>;
passing a pointer to the first array element to a helper function.
Keep the example within ordinary safe-to-run hosted code. Do not expand it into allocator, raw syscall, FFI, or ownership semantics.
Completion criteria
The example passes wavec check and wavec run on a supported hosted target.
A pointer-based helper visibly updates caller-owned data.
Fixed-array indexing and pointer access are both demonstrated.
The code avoids undefined out-of-bounds or dangling-pointer behavior.
The example is listed in the examples index or local README.
documentationIssues or enhancements related to the documentation.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
Activity