Contents

openswiftuiproject/openfoundation

> [!CAUTION]

Usage

First add the dependency in your Package.swift and add coresponding Clang flag.

let package = Package(
    name: "DemoKit",
    products: [
        .library(name: "DemoKit", targets: ["DemoKit"]),
    ],
    dependencies: [
        .package(url: "https://github.com/OpenSwiftUIProject/OpenFoundation", from: "0.0.1"),
    ],
    targets: [
        .target(
            name: "DemoKit",
            dependencies: [
                .product(name: "OpenFoundation", package: "OpenFoundation")
            ],
            // Upstream issue llvm/llvm-project#48757
            cSettings: [
                .unsafeFlags(["-Wno-elaborated-enum-base"]),
            ]
        ),
    ]
)

Then in your C code, you can include OpenFoundation/OpenFoundation.h on non-Darwin platform.

#include <OpenFoundation/OpenFoundation.h>

License

Most of the code is from apple/swift-corelibs-foundation with small modification.

This repo is released under the Apache license. See LICENSE for details.

Acknowledgements

Package Metadata

Repository: openswiftuiproject/openfoundation

Default branch: main

README: README.md