# spirv: minimal start code · gitcafe/zig

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

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

Visibility: public

Requested revision: a7563e453dce0cc256a0c40af434731f2cf7dcaf

Requested commit: a7563e453dce0cc256a0c40af434731f2cf7dcaf

Commit: a7563e453dce0cc256a0c40af434731f2cf7dcaf

Tree: a0483d968b31c6d5a90bb32312bf13af62c0b79d

Author: Robin Voetter

Committer: Robin Voetter

## Message

```
spirv: minimal start code

For SPIR-V, only export the main function if it is actually declared. Kernel
entry points will often have parameters and more than one kernel declared.

In general, SPIR-V binaries should mostly be compiled as libraries and not as
executables. However, this start code is required so that we can build test
executables.

Note that a call to isSpirV() would emit the code for that function, even though
the call is at comptime. To save that function from being emitted the checks
are just inlined manually.

```

## Parents

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

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