Skip to content

Repository files navigation

OpenAttributeGraph

codecov

OpenAttributeGraph is an open source implementation of Apple's Private framework - AttributeGraph which is a high performance computing engine written in C++ and Swift.

And it powers the underlying computing and diffing of OpenSwiftUI.

CI Status
Compatibility tests
macOS
iOS
Ubuntu

The project is for the following purposes:

  • Add OAG support for non-Apple platform (eg. Linux, WASI and Windows)
  • Diagnose and debug AG issues on Apple platform

Currently, this project is in early development.

Please refer to the documentation for more information on it.

Usage

Via Swift Package Manager

Add OpenAttributeGraph as a dependency in your Package.swift:

dependencies:[.package(url:"https://github.com/OpenSwiftUIProject/OpenAttributeGraph.git", from:"0.5.0")]

Note

  • You may need to configure the Swift toolchain header for proper integration of OpenAttributeGraph
  • By default, OpenAttributeGraphShims will use the private AttributeGraph as its implementation on Apple platforms

Via Prebuilt XCFramework

For a simpler setup, you can use the prebuilt XCFramework available on the releases page.

Project Structure

TargetDescription
OpenAttributeGraphMain Swift module exposing the public API
OpenAttributeGraphCxxCore C++ engine implementation
OpenAttributeGraphShimsCompatibility shims for OAG API
UtilitiesLow-level C++ data structures and smart pointers
PlatformCross-platform abstraction for logging and memory allocation
SwiftBridgingCross-platform Swift/C++ bridging compatibility header
SwiftCorelibsSystem SDK API compatibility headers for non-Darwin platforms

Build

The current suggested toolchain to build the project is Swift 6.2.4 / Xcode 26.3.

Clone Swift headers

The project requires Swift toolchain headers for compilation. They are included as a git submodule:

git submodule update --init

Xcode (via Tuist)

This project uses Tuist to generate the Xcode project for framework builds.

  1. Install Tuist (if not already installed):

    # via mise
    mise install tuist
    # or via Homebrew
    brew install tuist
  2. Generate the Xcode project:

    tuist generate
  3. Build using the generated workspace:

    xcodebuild build -workspace OpenAttributeGraph.xcworkspace -scheme OpenAttributeGraph -destination 'generic/platform=iOS Simulator'

License

See LICENSE file - MIT

Credits

See CREDITS.md for third-party licenses and acknowledgements.

About

[WIP] OpenAttributeGraph is an open source implementation of Apple's AttributeGraph

Resources

Stars

114 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages