Skip to main content

Apache OpenDAL™ Swift Binding

A Swift binding for OpenDAL: access storage services through one API, backed by the Rust core.

New to the model behind the API? Read Concepts first — service, operator, and operation are the same ideas in every language.

Experimental / WIP

This binding is unreleased and under active development. The API surface is minimal, breaking changes may happen without notice, and it is not suitable for production use. Contributions welcome.

Status

Experimental — unreleased. Only blocking read and write are implemented. The binding depends on the C binding and must be built from source; it is not published to any package registry.

Capabilities

CapabilityStatus
Blocking readSupported
Blocking writeSupported
Async read/writeNot yet
Stat / metadataNot yet
ListNot yet
DeleteNot yet
Presigned URLsNot yet

The Operator class is the single entry point. It accepts a service scheme string and a dictionary of string options, matching the same model as every other OpenDAL binding. See Services for the full list of backends and their configuration keys.

Installation

The package is not published to any registry. You must build the C dependency and reference the package by local path.

1. Build the C dependency

cd bindings/swift
make build-c

2. Add a local path dependency

In your project's Package.swift:

// swift-tools-version:5.7
import PackageDescription

let package = Package(
name: "MyTool",
dependencies: [
.package(path: "/path/to/opendal/bindings/swift/OpenDAL"),
],
targets: [
.target(name: "MyTool", dependencies: [
.product(name: "OpenDAL", package: "OpenDAL"),
]),
]
)

Replace /path/to/opendal with the absolute path to your local checkout.

Next steps

  1. Getting started — create an operator, write data, read it back.