Logo
Explore Help
Sign In
logos-messaging/nim-ffi
1
0
Fork 0
You've already forked nim-ffi
mirror of https://github.com/logos-messaging/nim-ffi.git synced 2026-06-21 16:59:30 +00:00
Code Issues Packages Projects Releases Wiki Activity
nim-ffi/examples/timer/ios/cheaders/module.modulemap

6 lines
86 B
Plaintext
Raw Normal View History

docs(examples): add iOS (Swift) example over the native C ABI A SwiftPM package wrapping the timer library's native ABI behind an idiomatic `TimerNode` Swift class. `build-xcframework.sh` cross-compiles the Nim library to a static MyTimer.xcframework with three slices — ios-arm64 (device), ios-arm64-simulator, and macos-arm64 — assembling the .xcframework by hand so it works without a functioning Simulator toolchain (CI-friendly). The wrapper bridges the async FFI-thread callback to a synchronous Swift API with a semaphore and reads the typed EchoResponse struct out of the callback. The macos-arm64 slice makes the wrapper testable on the host: `swift test` passes against it. Device/simulator slices are the real iOS deployment artifacts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 13:29:49 +02:00
module CMyTimer {
header "my_timer.h"
header "my_timer_cbor.h"
export *
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.0 Page: 67ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API