tapi-tbdv4(1)
π
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 is4. Periodt.install-name: <path>β Specifies the install name of the dylib. This key is part of theLC_ID_DYLIBload 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 theLC_SUB_FRAMEWORKload 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 theLC_SUB_CLIENTload 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 theLC_REEXPORT_DYLIBload 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_namespaceandnot_app_extension_safe.flat_namespaceis 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_safeindicates 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 is1.0if not specified. This key is part of theLC_ID_DYLIBload command in the Mach-O format.compatibility-version: <version>β Specifies the compatibility version of the dynamic library file. The default value is1.0if not specified. This key is part of theLC_ID_DYLIBload 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 is0if 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
- nixos 26.05: libtapi 1600.0.11.8
- nixpkgs unstable: libtapi 1600.0.11.8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms