# link: give executable bit to wasm executables sometimes · gitcafe/zig

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

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

Visibility: public

Requested revision: 2834b937f143aa80e3730706dac5ff44cea3a67d

Requested commit: 2834b937f143aa80e3730706dac5ff44cea3a67d

Commit: 2834b937f143aa80e3730706dac5ff44cea3a67d

Tree: 7c30f364da78b2738adbfb4cb392e2228dd1553d

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
link: give executable bit to wasm executables sometimes

Give +x to the .wasm file if it is an executable and the OS is WASI.
Some systems may be configured to execute such binaries directly. Even
if that is not the case, it means we will get "exec format error" when
trying to run it rather than "access denied", and then can react to that
in the same way as trying to run an ELF file from a foreign CPU
architecture.

This is part of the strategy to unify RunStep and EmulatableRunStep.

```

## Parents

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

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