From 78f7bb7857e8fa52602a8dc2a895294c8d4c0e40 Mon Sep 17 00:00:00 2001 From: agra Date: Sun, 14 Jun 2026 12:21:37 +0300 Subject: [PATCH] ... --- specs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs.md b/specs.md index 3092839..4b1d5f1 100644 --- a/specs.md +++ b/specs.md @@ -1206,7 +1206,7 @@ write_fd :: (fd: i32, buf: [*]u8, count: u64) -> i64 #foreign libc "write"; ``` - `#library "name"` must be assigned to a named constant. The library is passed to the linker (`-lname` on Unix, `name.lib` on Windows). -- `#foreign lib_ref` declares a function as external C. The library reference is mandatory. +- `#foreign lib_ref` declares a function as external C. The library reference is optional: when present it is passed to the linker (`-lname` on Unix); when omitted (`name :: (…) -> T #foreign;`), the symbol must resolve at link time from a framework or an already-linked / auto-detected library. - `#foreign lib_ref "c_symbol"` renames the binding: the sx function name differs from the C symbol. This avoids name collisions (e.g. POSIX `write` vs an sx builtin). ### C Interop Type Mapping