~/talk

Foreign Function and Memory APIs and Swift/Java interoperability

Talkat try! Swift Tokyo 2025 · 2025-04-09..04-11· [swift, android]
slides:none on file

Concrete interoperability work connects Swift and Java using Foreign Function and Memory API (JDK22) with a JNI fallback, plus a jextract-swift generator that emits Java wrappers and Swift glue. It derives Swift type metadata and value witness table sizes at runtime to allocate dense structs, exposes initializers via C-calling-convention shims, and uses arena-based lifetimes (try-with-resources or GC-backed arenas) to keep memory-safe reference counting and predictable destruction. Early, experimental, server- and Android-focused; Java 25 is the targeted stable FFM release.

AI-written summary · about

  1. 0:00Swift/Java interoperability
  2. 2:54Foreign Function and Memory APIs
  3. 6:06Java calling Swift
  4. 9:55Handling Swift types
  5. 12:28Initializing Swift types from Java
  6. 16:23Swift memory layouts
  7. 18:30Invoking Swift methods
  8. 20:56Memory management in Swift-Java
  9. 22:43Deep integration and future
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.