# wasm-linker: consolidate writing to file · gitcafe/zig

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

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

Visibility: public

Requested revision: 6f44e2d1d3dc1ac7942082dc98947f7beaa1f205

Requested commit: 6f44e2d1d3dc1ac7942082dc98947f7beaa1f205

Commit: 6f44e2d1d3dc1ac7942082dc98947f7beaa1f205

Tree: 185feb74c344b1b17dc823d746446d9af7967c4a

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: consolidate writing to file

This merges the paths from flushModule and linkWithZld to a single
function that will write the entire WebAssembly module to the file.
This reduces the chance of mistakes as we do not have to duplicate
the logic. A similar action may be needed later for linkWithLLD.

```

## Parents

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

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