8 stable releases (3 major)

Uses new Rust 2024

new 3.0.0 Mar 13, 2026
2.0.1 Feb 13, 2026
1.0.4 Jan 28, 2026
1.0.1 Dec 30, 2025
0.38.3 Oct 28, 2025

#996 in Machine learning

Download history 806/week @ 2025-11-21 1029/week @ 2025-11-28 1421/week @ 2025-12-05 1177/week @ 2025-12-12 960/week @ 2025-12-19 1596/week @ 2025-12-26 1978/week @ 2026-01-02 1900/week @ 2026-01-09 3680/week @ 2026-01-16 4226/week @ 2026-01-23 4859/week @ 2026-01-30 4778/week @ 2026-02-06 6006/week @ 2026-02-13 5489/week @ 2026-02-20 6574/week @ 2026-02-27 7392/week @ 2026-03-06

26,408 downloads per month
Used in 52 crates (via lancedb)

Apache-2.0

9MB
198K SLoC

lance-namespace-impls

Lance Namespace implementation backends.

Overview

This crate provides concrete implementations of the Lance namespace trait:

  • Unified connection interface for all implementations
  • REST Namespace - REST API client for remote Lance namespace servers (feature: rest)
  • Directory Namespace - File system-based namespace that stores tables as Lance datasets (always available)

Features

REST Namespace (feature: rest)

The REST namespace implementation provides a client for connecting to remote Lance namespace servers via REST API.

Directory Namespace (always available)

The directory namespace implementation stores tables as Lance datasets in a directory structure on local or cloud storage.

Supported storage backends:

  • Local filesystem (always available)
  • AWS S3 (feature: dir-aws)
  • Google Cloud Storage (feature: dir-gcp)
  • Azure Blob Storage (feature: dir-azure)
  • Alibaba Cloud OSS (feature: dir-oss)

Usage

Connecting to a Namespace

use lance_namespace_impls::connect;
use std::collections::HashMap;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Connect to REST implementation
    let mut props = HashMap::new();
    props.insert("uri".to_string(), "http://localhost:8080".to_string());
    let namespace = connect("rest", props).await?;

    Ok(())
}

Using Directory Namespace

use lance_namespace_impls::connect;
use std::collections::HashMap;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Connect to local directory
    let mut props = HashMap::new();
    props.insert("root".to_string(), "/path/to/data".to_string());
    let namespace = connect("dir", props).await?;

    // Connect to S3
    let mut props = HashMap::new();
    props.insert("root".to_string(), "s3://my-bucket/path".to_string());
    props.insert("storage.region".to_string(), "us-west-2".to_string());
    let namespace = connect("dir", props).await?;

    Ok(())
}

Configuration

Directory Namespace Properties

  • root - Root path for the namespace (local path or cloud storage URI)
  • storage.* - Storage-specific options (e.g., storage.region, storage.access_key_id)

Documentation

For more information about Lance and its namespace system, see the Lance Namespace documentation.

Dependencies

~141MB
~2.5M SLoC