# wasm: Implement \`@wasmMemoryGrow\` builtin · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/43cb19ea4da63dcaa8a18a06e3ab23f1c822c1fe)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 43cb19ea4da63dcaa8a18a06e3ab23f1c822c1fe

Requested commit: 43cb19ea4da63dcaa8a18a06e3ab23f1c822c1fe

Commit: 43cb19ea4da63dcaa8a18a06e3ab23f1c822c1fe

Tree: cb5cb5fd83ddb948f5d3fddc7819849fb2154006

Author: Luuk de Gram

Committer: Andrew Kelley

## Message

```
wasm: Implement `@wasmMemoryGrow` builtin

Similarly to the other wasm builtin, this implements the grow variation where the memory
index is a comptime known value. The operand as well as the result are runtime values.
This also verifies during semantic analysis the target we're building for is wasm, or else
emits a compilation error. This means that other backends do not have to handle this AIR instruction,
other than the wasm and LLVM backends.

```

## Parents

- [ec4c30ae483e6700a1fd1d5edaadbb042790c52e](https://git.cafe/gitcafe/zig/commit/ec4c30ae483e6700a1fd1d5edaadbb042790c52e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/43cb19ea4da63dcaa8a18a06e3ab23f1c822c1fe?format=markdown)
