Apache OpenDAL™ Haskell Binding (WIP)

July 10, 2026 · View on GitHub

We release the OpenDAL Haskell binding independently of the opendal crate (Rust core). For updates and compatibility, use the Haskell binding version instead of the opendal crate version.

Access S3, GCS, Azure Blob, the local filesystem, and 50+ more services from Haskell through a single, consistent API backed by the OpenDAL Rust core.

Build

Requires a working Rust toolchain (cargo) in addition to GHC and cabal. The custom build step compiles the Rust FFI library automatically.

cabal build

Run the test suite:

cabal test

Generate Haddock documentation:

cabal haddock
# cabal haddock --open   (cabal >= 3.8)

Quickstart

import OpenDAL

main :: IO ()
main = do
  Right op <- newOperator "memory"
  result <- runOp op $ do
    writeOp "hello.txt" "Hello, World!"
    content <- readOp "hello.txt"
    deleteOp "hello.txt"
    return content
  case result of
    Left err    -> putStrLn $ "error: " ++ show (errorCode err)
    Right bytes -> print bytes

See the user guide for a full walkthrough, including real backends, error handling, streaming writes, and directory listing.

Contributing

See CONTRIBUTING.md for how to build, test, and submit changes.

License and Trademarks

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.