Swift · Installation

Installation

import UForm 4.0.0-rc.1 · 3ee5e534

dependencies: [
    .package(url: "https://github.com/unum-cloud/UForm", .upToNextMajor(from: "4.0.0"))
]

The package compiles the Swift surface only. SwiftPM downloads the engine prebuilt, as the release’s UFormC XCFramework on Apple platforms and as its artifact bundle on Linux, and the engine links the system codecs, libjpeg-turbo, libpng, libwebp and FFmpeg, which the application provides. A checkout builds its own with CMake and points UFORM_SWIFT_ARTIFACT at it, relative to the package root:

cmake --preset swift
cmake --build --preset swift
UFORM_SWIFT_ARTIFACT=build_swift/UFormC.xcframework swift build # UFormC.artifactbundle off Apple platforms

The test suite runs in seconds against the stub library, which answers every verb with deterministic rows of the right shape:

cmake --preset swift -D UFORM_BUILD_STUB=ON
cmake --build --preset swift
UFORM_SWIFT_ARTIFACT=build_swift/UFormC.xcframework swift test # UFormC.artifactbundle off Apple platforms

API

Functions

versionThe version of the linked library, like 4.0.0.
Types.swift:957 ↗
func version() -> String

Calls uform_version_name.