Calling Native Code From Ruby
summary
CocoaPods’ xcodeproj removes its painful C extension by using Fiddle (MRI since 1.9) to call CoreFoundation for plist read/write and private Xcode APIs, loading symbols with dlopen/dlsym and caching function objects to avoid repeated setup. A simple name check triggers manual create/auto‑release handling and Objective‑C calls go through objc_msgSend. The result: no user compile failures (projects report >200 compile issues for C extensions), working wrappers but with a clear performance caveat.
AI-written summary · about
chapters (4)
- 0:00Start
- 0:06Calling native code from Ruby
- 0:50Because nobody got time to deal with user's compiler problems
- 2:35Fiddle!








