Skip to main content

Apache OpenDAL™ C Binding

A C binding for OpenDAL, giving C programs blocking access to S3, GCS, Azure Blob, the local filesystem, and 50+ more services through one API backed by the Rust core.

New to the model behind the API? Read Concepts first — the shared storage semantics and path and operation concepts every binding expresses through its own native API.

Experimental

This binding is experimental and a work in progress. The API surface is limited, there are no pre-built packages, and breaking changes may occur between releases. It must be built from source.

Status​

Unreleased and experimental. The C binding exposes a blocking-only API generated via cbindgen from the Rust core. There is no async interface and no package registry distribution; you must compile the shared library yourself.

Capabilities​

  • Blocking operations — write, read, stat, delete, copy, rename, list, and create-dir through a single opendal_operator *.
  • Streaming reader and writer — opendal_reader and opendal_writer for chunk-at-a-time I/O with seek support on the reader.
  • Services — enable additional backends with -DFEATURES when running CMake.
  • C11 compatible — the header opendal.h requires C11 or later (and a C++14 compiler for the Rust-generated glue).
  • Explicit memory ownership — every heap-allocated value has a matching *_free function; fallible operations return an opendal_error * that is NULL on success and write output values through caller-provided pointers.

Building​

Follow Build the library for the CMake commands and the paths to the library and header.

Next steps​

  1. Getting started — build an operator, write and read data, handle errors, and free resources.