- ios: --target ios/ios-sim shorthands, iOS SDK auto-discovery,
#framework directive + BuildOptions.add_framework hook,
.app bundle + Info.plist + codesign (ad-hoc and real),
--codesign-identity/--provisioning-profile/--entitlements flags,
modules/std/{objc,uikit}.sx, dynamic class registration,
typed objc_msgSend cast pattern, UIApplicationMain handoff,
UIWindow scene attach. Runs on iPhone hardware.
- ir: silent .s64 defaults → loud diagnostics,
resolveReturnType infers from body, sub-byte int sizes match LLVM,
tuple type interning includes names, compile errors exit 1
- issue-NNNN convention: resolved bugs rename to focused features
- 50 regression tests passing
17 lines
466 B
Plaintext
17 lines
466 B
Plaintext
// `callconv(.c)` on function pointers passed to foreign callbacks — ensures
|
|
// the function uses C ABI so it can be safely invoked from `#foreign`
|
|
// functions like SDL_AddEventWatch.
|
|
|
|
#import "modules/std.sx";
|
|
|
|
// A function with C calling convention
|
|
add_c :: (a: s64, b: s64) -> s64 callconv(.c) {
|
|
a + b;
|
|
}
|
|
|
|
main :: () {
|
|
// Call it directly — should work like any other function
|
|
result := add_c(10, 32);
|
|
print("callconv(.c): {}\n", result);
|
|
}
|