# wasm-linker: Link into binary during flush · gitcafe/zig

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

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

Visibility: public

Requested revision: 6e88df44a29e0c30c341f113cf4771e08fc1f0fe

Requested commit: 6e88df44a29e0c30c341f113cf4771e08fc1f0fe

Commit: 6e88df44a29e0c30c341f113cf4771e08fc1f0fe

Tree: 93f5cab9205d166060d39fda5c38544d093f4bd1

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: Link into binary during flush

This contains a few additions:
- Proper stack pointer calculation keeping alignment in mind.
- Setting up memory layout (including user flags).
- Export or import memory
- Handle 'easy' linker tasks during incremental compilation, while offloading
heavy-tracking/computation tasks to `flush()`
- This architecture allows us to easily integrate with the rest of 'zwld' to
implement linking stage2 code with external object files.

```

## Parents

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

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