web engine - experimental web browser

Objective-C runtime FFI #2

open opened by pierrelf.com

Implement platform/src/objc.rs: extern "C" bindings to the Objective-C runtime.

Required bindings:

  • objc_msgSend (with proper variadic/ABI handling for AArch64)
  • objc_getClass
  • sel_registerName
  • class_addMethod
  • objc_allocateClassPair / objc_registerClassPair

Rust abstractions:

  • msg_send! macro for type-safe(ish) message dispatch
  • Class wrapper type
  • Sel wrapper type
  • Id wrapper type (non-null pointer to Obj-C object)

Link: libobjc.dylib

Unit test: objc_getClass("NSObject") returns non-null.

This is the foundation all other platform FFI builds on.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:meotu43t6usg4qdwzenk4s2t/sh.tangled.repo.issue/3mfkgyov6gf2k