Skip to main content

server

Attribute Macro server 

Source
#[server]
Expand description

Server-only code. The item is compiled only for non-browser targets, so referencing it from code compiled to wasm32 fails at compile time instead of leaking server logic or secrets into a client bundle.

Expansion: the item unchanged, prefixed with #[cfg(not(target_arch = "wasm32"))].