This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nub-lang-archive-2/example/interop/c.nub
2025-06-08 15:54:36 +02:00

22 lines
604 B
Plaintext

namespace c
// extern func printf(fmt: ^u8, ...args: any): void
// extern func getchar(): i32
extern func puts(fmt: []u8)
// extern func malloc(size: i64): ^void
// extern func calloc(num: i64, size: i64): ^void
// extern func realloc(ptr: ^void, size: i64): ^void
// extern func free(ptr: ^void)
// extern func sin(x: f64): f64
// extern func cos(x: f64): f64
// extern func tan(x: f64): f64
// extern func sqrt(x: f64): f64
// extern func pow(x: f64, y: f64): f64
// extern func abs(x: i32): i32
// extern func time(t: ^i64): i64
// extern func clock(): i64
// extern func sleep(seconds: u32): i32