This package provides a native .NET binding for Apache OpenDAL™, a data access layer that allows you to access various storage services in a unified way.
We release the OpenDAL .NET binding independently of the
opendal crate (Rust core). For updates
and compatibility, use the .NET binding version instead of the opendal crate
version.
- User guide: opendal.apache.org/docs/bindings/dotnet — install, connect, common tasks, and going to production.
- Services & configuration: opendal.apache.org/services
- OpenDAL Scheme reference: docs.rs/opendal — enum.Scheme
This binding is not yet published to NuGet. Build it from source — you need the
.NET SDK for net8.0 or
net10.0 and a Rust toolchain for the native library:
cargo build
dotnet buildusing OpenDAL;
using System.Text;
// Configure a service, then build an operator from it.
using var op = new Operator("memory");
// The same verbs work on every service.
op.Write("hello.txt", Encoding.UTF8.GetBytes("Hello, World!"));
var bytes = op.Read("hello.txt");
Console.WriteLine(Encoding.UTF8.GetString(bytes));
Console.WriteLine(op.Stat("hello.txt").ContentLength);To use a real backend, change the scheme and pass its configuration — the operations stay identical:
using var op = new Operator("s3", new Dictionary<string, string>
{
["bucket"] = "your_bucket",
["region"] = "your_region",
});OpenDAL also has a first-class async API — every operation has an …Async
counterpart. See
Getting started
and Connecting to your storage
for the full guide.
To build and test the binding from source:
cargo build
dotnet build
dotnet testFor a complete guide on building, testing, and contributing, see the project's CONTRIBUTING guide.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.
Compiled distributions include the following Mozilla Public License 2.0 components. Their source code is available from the linked project pages:
colored3.1.1 (source, homepage), licensed under MPL-2.0.option-ext0.2.0 (source, homepage), licensed under MPL-2.0.persy1.8.1 (source, homepage), licensed under MPL-2.0.
The distribution includes the MPL-2.0 text in LICENSE-MPL-2.0.txt.
The source distribution includes .gitignore, derived from
VisualStudio.gitignore and dedicated to
the public domain under CC0-1.0. The distribution includes the CC0-1.0 text in
LICENSE-CC0-1.0.txt.