# wasm: Implement trunc/wrap for 128 bit integers · gitcafe/zig

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

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

Visibility: public

Requested revision: 10fe24c043c95180f658c3eb4d7fbbfd0388c14e

Requested commit: 10fe24c043c95180f658c3eb4d7fbbfd0388c14e

Commit: 10fe24c043c95180f658c3eb4d7fbbfd0388c14e

Tree: dfc10ffd74a22dae5a517cb9b229b50493aa7f40

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Implement trunc/wrap for 128 bit integers

This also implments wrapping for arbitrary integer widths between 64 and 128.
`@truncate` was fixed where the wasm types between operand and result differentiated.
We solved this by first casting and then wrapping.

```

## Parents

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

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