# link.File.Wasm: parse inputs in compilation pipeline · gitcafe/zig

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

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

Visibility: public

Requested revision: f2dcfe0e408e1abf0c75293d75c4d92aed033eae

Requested commit: f2dcfe0e408e1abf0c75293d75c4d92aed033eae

Commit: f2dcfe0e408e1abf0c75293d75c4d92aed033eae

Tree: ac640108ecaa7f43b5c61cc2c46b744093e4926e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
link.File.Wasm: parse inputs in compilation pipeline

Primarily, this moves linker input parsing from flush() into the linker
task queue, which is executed simultaneously with the frontend.

I also made it avoid redundantly opening the same archive file N times
for each object file inside. Furthermore, hard code fixed buffer stream
rather than using a generic stream type.

Finally, I fixed the error handling of the Wasm.Archive.parse function.
Please pay attention to this pattern of returning a struct rather than
accepting a mutable struct as an argument. This ensures function-level
atomicity and makes resource management straightforward.

Deletes the file and path fields from Archive and Object.

Removed a well-meaning but ultimately misguided suggestion about how to
think about ZigObject since thinking about it that way has led to
problematic anti-DOD patterns.

```

## Parents

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

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