# wasm-linker: write magic bytes only on success · gitcafe/zig

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

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

Visibility: public

Requested revision: a01b1448e2927146cde9f7861605585f96b5084d

Requested commit: a01b1448e2927146cde9f7861605585f96b5084d

Commit: a01b1448e2927146cde9f7861605585f96b5084d

Tree: 9fcaa97cbb0fbf7cf0068f2fbacdb2f107ee564f

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: write magic bytes only on success

By writing them at the very end, we can easily detect
where the writing of the binary went wrong as tools will
indicate the missing of the magic bytes.

```

## Parents

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

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