# wasm: Implement 'memcpy' instruction · gitcafe/zig

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

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

Visibility: public

Requested revision: eafdc5562f5053ecc193041e83d3661ef0744ebb

Requested commit: eafdc5562f5053ecc193041e83d3661ef0744ebb

Commit: eafdc5562f5053ecc193041e83d3661ef0744ebb

Tree: 2e12cfdc1b0348ba309b209ada085d5268a1862d

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Implement 'memcpy' instruction

This implements the `memcpy` instruction and also updates the inline memcpy calls
to make use of the same implementation. We use the fast-loop when the length is comptime known,
and use a runtime loop when the length is runtime known.
We also perform feature-dection to emit a simply wasm memory.copy instruction when the feature
'bulk-memory' is enabled. (off by default).

```

## Parents

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

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