Skip to content

CAttribute

1 min read

Import: import system.interop;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

CAttribute

Binds an extern function to a C ABI library/symbol: @c("lib", "symbol"). @c("lib") uses the Dream name as the symbol; bare @c also binds to the declaring package's native/ sources. Native and portable WASM builds are supported; runtime annotations restrict availability.

public struct CAttribute

library

Optional native library containing the foreign symbol.

public library: Option<string>

symbol

Identifier of the referenced symbol.

public symbol: Option<string>