Attributes
V 0.4.4+ uses the @[attr] syntax. Older code uses [attr].
@[inline] / @[noinline] @[deprecated: 'use x'] / @[deprecated_after: '2025-12-31']
Function must be called inside unsafe {} Struct is always heap-allocated
Struct used for named/default parameters (can be omitted at the call site) Field must be initialized Function never returns Windows console subsystem for GUI apps @[export: 'c_name'] Export with a C symbol name @[callconv: 'stdcall'] Calling convention (C interop) Keep GC'd args alive during C calls Disable autofree for a function
Disable bounds checks in a function (performance) Packed struct layout C struct is a typedef
Function calls removed unless -d debug @[json: 'name'], @[json: '-'], @[omitempty], @[raw] JSON field mapping
@[sql: 'col'], @[primary], @[sql: serial], @[unique], @[default: 'x'], @[nonull], @[sql_type: 'TEXT']
@[get], @[post], @['/path/:id'], @[middleware] Hot code reloading Reorder struct fields to reduce padding Code translated from C (relaxed rules) Prevent removal by -skip-unused