#import "modules/std.sx"; #import "modules/math"; #import "modules/build.sx"; #import "modules/std/test.sx"; pkg :: #import "tests/fixtures/testpkg"; // --- Foreign function binding --- libc :: #library "c"; c_abs :: (n: s32) -> s32 #foreign libc "abs"; // --- Protocol declarations (Phase 1: static dispatch only) --- main :: () { // ======================================================== // 15. FOREIGN FUNCTION BINDING // ======================================================== print("=== 15. Foreign ===\n"); // Symbol rename: c_abs maps to C's abs() print("foreign-rename: {}\n", c_abs(xx -42)); }