diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 12:33:58 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 12:33:58 +0000 |
| commit | a3b85c9737b509fd2a792b65aa2365b9bcc9fe6a (patch) | |
| tree | 829577514fc4f0436e61c523eb1082afe891bcbf /README.md | |
| parent | b40fc44f799b4810981d37d9030ca69d768cc0b2 (diff) | |
Support for more attributes
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -864,6 +864,14 @@ Decorate functions and structs to modify compiler behavior. | `@weak` | Fn | Weak symbol linkage. | | `@section("name")` | Fn | Place code in specific section. | | `@noreturn` | Fn | Function does not return (e.g. exit). | +| `@pure` | Fn | Function has no side effects (optimization hint). | +| `@cold` | Fn | Function is unlikely to be executed (branch prediction hint). | +| `@hot` | Fn | Function is frequently executed (optimization hint). | +| `@export` | Fn/Struct | Export symbol (visibility default). | +| `@global` | Fn | CUDA: Kernel entry point (`__global__`). | +| `@device` | Fn | CUDA: Device function (`__device__`). | +| `@host` | Fn | CUDA: Host function (`__host__`). | +| `@comptime` | Fn | Helper function available for compile-time execution. | | `@derive(...)` | Struct | Auto-implement traits. Supports `Debug`, `Eq` (Smart Derive), `Copy`, `Clone`. | ### Smart Derives |
