tapi-tbdv4(1)

πŸ“¦ version 1600.0.11.8, in nixos 26.05, nixpkgs unstable

πŸ’… tbd β€” Text Based Dynamic Library Stub πŸ’…

Okay bestie, this is the tapi-tbdv4(1) page β€” the TAPI TBD Version 4 Format Documentation β€” and it's literally all about tbd, the Text Based Dynamic Library Stub. The vibe? Human-readable Mach-O dylib info, but make it text. πŸŽ€


🌸 NAME 🌸

tbd - Text Based Dynamic Library Stub

πŸ¦‹ DESCRIPTION πŸ¦‹

TAPI both generates and operates over text based stub files (.tbd). These files are a textual, human readable representation of Mach-O dynamic libraries (dylib) holding properties needed to resolve static link time dependencies including the same exported symbols as the original dynamic library. Format versions 1 - 4 were represented in YAML. No cap, that's the whole mood. ✨

πŸ”‘ REQUIRED KEYS πŸ”‘

These are the required keys, bestie β€” you literally can't skip them. πŸ’…

  • tbd-version: <int> β€” Specifies the TBD file version. The only supported version is 4. Periodt.
  • install-name: <path> β€” Specifies the install name of the dylib. This key is part of the LC_ID_DYLIB load command in the Mach-O format.
  • targets: <array> β€” Specifies the list of supported architecture/platform tuples. The following platform identifiers are supported: macos, maccatalyst, ios, ios-simulator, tvos, tvos-simulator, watchos, watchos-simulator. Slay.

πŸŽ€ OPTIONAL KEYS πŸŽ€

These are optional, but like... if you need them, you need them. 🫢

  • parent-umbrella: <section> β€” Specifies the parent umbrella of the dynamic library, if applicable. This key is equivalent to the LC_SUB_FRAMEWORK load command in the Mach-O format. The section contains an array of targets and its associated umbrella name.
  • allowable-clients: <section> β€” Specifies the allowable clients that are permitted to link against the dynamic library file. This key is equivalent to the LC_SUB_CLIENT load command in the Mach-O format. The section contains an array of targets and its associated list of client names.
  • reexported-libraries: <section> β€” Specifies a list of reexported libraries. This key is equivalent to the LC_REEXPORT_DYLIB load command in the Mach-O format. The section contains an array of targets and its associated list of reexported library names.
  • flags: <array> β€” Specifies the flags of the dylib. Valid flags are: flat_namespace and not_app_extension_safe. flat_namespace is deprecated, but there are still some old binaries around on macOS that depend on flat namespace linking. The default is two level namespace linking. not_app_extension_safe indicates that the library is not safe to be used in an Application Extension. πŸ‘€
  • current-version: <version> β€” Specifies the current version of the dynamic library file. The default value is 1.0 if not specified. This key is part of the LC_ID_DYLIB load command in the Mach-O format.
  • compatibility-version: <version> β€” Specifies the compatibility version of the dynamic library file. The default value is 1.0 if not specified. This key is part of the LC_ID_DYLIB load command in the Mach-O format.
  • swift-abi-version: <int> β€” Specifies the Swift ABI version the dynamic library file was compiled with. The default value is 0 if not specified. The Swift ABI version is encoded in the Objective-C image section.
  • exports: <section> β€” Specifies the regular exported symbol sections. The section contains an array of targets and its associated list of symbol names.
  • re-exports: <section> β€” Specifies the exported symbol sections not defined in the library itself, but coming from a different library instead. The section contains an array of targets and its associated list of symbol names.
  • undefineds: <section> β€” Specifies the undefined symbol sections which are only used for flat address space libraries. The section contains an array of targets and its associated list of symbol names.
  • objc-classes: <array> β€” Specifies the list of exported, re-exported, or undefined Objective-C class names.
  • objc-eh-types: <array> β€” Specifies the list of exported, re-exported, or undefined Objective-C class exception type names.
  • objc-ivars: <array> β€” Specifies the list of exported, re-exported, or undefined Objective-C instance variable names.
  • weak-symbols: <array> β€” Specifies the names of weak defined symbols for exported symbol sections or weak referenced symbols for undefined symbol sections.
  • thread-local-symbols: <array> β€” Specifies the symbol name of thread local exports.

🌈 Examples 🌈

Here's the example, copied exactly β€” no edits, no vibes-based rewriting, bestie. πŸ’–

        --- !tapi-tbd
        tbd-version: 4
        targets: [ arm64-macos, x86_64-macos, x86_64-maccatalyst ]
        flags: [ flat_namespace ]
        install-name: /usr/lib/libc.dylib
        current-version: 1.2.3
        compatibility-version: 1.1
        swift-abi-version: 5
        parent-umbrella:
           - targets: [ arm64-macos, x86_64-macos, x86_64-maccatalyst ]
             umbrella: System
        allowable-clients:
           - targets: [ arm64-macos, x86_64-macos, x86_64-maccatalyst ]
             clients: [ ClientA, ClientB ]
        reexported-libraries:
           - targets: [ x86_64-macos, x86_64-maccatalyst]
             library: [ /System/Library/Frameworks/Foo.framework/Foo ]
           - targets: [ arm64-macos]
             library: [ /System/Library/Frameworks/Bar.framework/Bar ]
        exports:
           - targets: [ x86_64-macos ]
             symbols: [ _symA ]
             objc-classes: []
             objc-eh-types: []
             objc-ivars: []
             weak-symbols: []
             thread-local-symbols: []
           - targets: [ x86_64-maccatalyst ]
             symbols: [ _symB ]
           - targets: [ x86_64-macos, x86_64-maccatalyst ]
             symbols: [ _symAB ]
        re-exports:
           - targets: [ arm64-macos ]
             symbols: [ _symC ]
             objc-classes: []
             objc-eh-types: []
             objc-ivars: []
             weak-symbols: []
             thread-local-symbols: []
        undefineds:
           - targets: [ arm64-macos ]
             symbols: [ _symD ]
             objc-classes: []
             objc-eh-types: []
             objc-ivars: []
             weak-symbols: []
             thread-local-symbols: []

πŸ‘‘ SEE ALSO πŸ‘‘

That's the whole squad. Go read them, iykyk. 🧚


Bye bestie πŸ’– β€” this page is from Darwin, dated 2023-03-08, and it's tapi-tbdv4(1). Catch you in the group chat! πŸŽ€βœ¨

πŸ“¦ where this page comes from