API Reference
Auto-generated from src/lib.vani, tests/, and examples/ -- every function and struct is listed in source declaration order, each with its signature, its preceding // comment (if any), and a real usage line pulled from this package's own tests or examples (if any). Coverage this run: 1/1 functions have a comment, 1/1 have a found usage example.
Functions
cuda_check
fn cuda_check(err: i32) -> OwnedStr
cuda\_malloc/cuda\_memcpy\_\*/etc. all return a raw i32 error code
(0 = success) rather than a vāṇी Result, matching the rest of
this package's "thin, uniform wrapper" design and this ecosystem's
existing FFI convention (see 09_ffi.md: "The FFI bridge is usually
a thin vāṇī wrapper around the C call that converts [it] into a
Result variant. You write the wrapper once."). This is that one
wrapper -- turn any of the i32 codes above into a message, or "" on
success, so a caller doesn't have to remember cuda_error_string's
exact name at every call site.
Example (from tests/test_bindings_typecheck.vani):
let msg: OwnedStr = cuda_check(rc1);