ic_object_store

Crates.ioic_object_store
lib.rsic_object_store
version1.2.1
created_at2025-01-07 12:34:58.021456+00
updated_at2025-08-26 03:47:07.706706+00
descriptionThe Rust version of the client SDK for the IC Object Store canister.
homepage
repositoryhttps://github.com/ldclabs/ic-oss/tree/main/src/ic_object_store
max_upload_size
id1507037
size136,881
0xZensh (zensh)

documentation

README

ic_object_store

License Crates.io Test Docs.rs Latest Version

IC Object Store is a native Rust implementation of Apache Arrow object store on the Internet Computer.

ic_object_store is the Rust version of the client SDK for the IC Object Store canister.

Overview

This library provides a Rust client SDK for interacting with the IC Object Store canister, which implements the Apache Object Store interface on the Internet Computer. It allows developers to seamlessly integrate with the decentralized storage capabilities of the Internet Computer using familiar Apache Object Store APIs.

Features

  • Full implementation of Apache Arrow object store APIs
  • Secure data storage with AES256-GCM encryption
  • Asynchronous stream operations for efficient data handling
  • Seamless integration with the Internet Computer ecosystem
  • Compatible with the broader Apache ecosystem

Installation

Add this to your Cargo.toml:

[dependencies]
ic_object_store = "1.1"

Usage

use ic_object_store::{Client, ObjectStoreClient, build_agent};
use object_store::ObjectStore;

let secret = [8u8; 32];
// backend: IC Object Store Canister
let canister = Principal::from_text("6at64-oyaaa-aaaap-anvza-cai").unwrap();
let sk = SigningKey::from(secret);
let id = BasicIdentity::from_signing_key(sk);
println!("id: {:?}", id.sender().unwrap().to_text());
// jjn6g-sh75l-r3cxb-wxrkl-frqld-6p6qq-d4ato-wske5-op7s5-n566f-bqe

let agent = build_agent("https://ic0.app", Arc::new(id))
    .await
    .unwrap();
let client = Arc::new(Client::new(Arc::new(agent), canister, Some(secret)));
let storage = ObjectStoreClient::new(client);

let path = Path::from("test/hello.txt");
let payload = "Hello Anda!".as_bytes().to_vec();
let res = storage
    .put_opts(&path, payload.into(), Default::default())
    .await
    .unwrap();
println!("put result: {:?}", res);

let res = storage.get_opts(&path, Default::default()).await.unwrap();
println!("get result: {:?}", res);

Documentation

For detailed documentation, please visit: https://docs.rs/ic_object_store

Related Projects

License

Copyright © 2024-2025 LDC Labs.

Licensed under the MIT License. See LICENSE for details.

Commit count: 126

cargo fmt