| Crates.io | lance-namespace-impls |
| lib.rs | lance-namespace-impls |
| version | 1.0.1 |
| created_at | 2025-10-28 11:50:04.941061+00 |
| updated_at | 2025-12-30 22:01:12.801025+00 |
| description | Lance Namespace Implementations |
| homepage | |
| repository | https://github.com/lance-format/lance |
| max_upload_size | |
| id | 1904629 |
| size | 491,740 |
Lance Namespace implementation backends.
This crate provides concrete implementations of the Lance namespace trait:
rest)rest)The REST namespace implementation provides a client for connecting to remote Lance namespace servers via REST API.
The directory namespace implementation stores tables as Lance datasets in a directory structure on local or cloud storage.
Supported storage backends:
dir-aws)dir-gcp)dir-azure)dir-oss)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(())
}
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(())
}
root - Root path for the namespace (local path or cloud storage URI)storage.* - Storage-specific options (e.g., storage.region, storage.access_key_id)For more information about Lance and its namespace system, see the Lance Namespace documentation.