Skip to content

Releases: spiceai/spice-rs

v3.1.0

12 Jan 03:59
0195105

Choose a tag to compare

What's Changed

  • Bump version to v3.1.0 for the next release by @ewgenius in #64
  • Update publish workflow to use crates.io OIDC auth to get registry token by @ewgenius in #63
  • fix: Update arrow and tonic by @peasee in #65
  • chore: Upgrade to arrow 57 and tonic 0.14 by @lukekim in #66

Full Changelog: v3.0.0...v3.1.0

v3.0

22 Jul 13:23
b43325f

Choose a tag to compare

Announcing spice-rs v3.0 🎉

The v3.0 release optimizes the Spice client API, adds support for robust query retry, and supports more custom metadata configurations for spice query.

What's New in v3.0.0

Immutable client API: Client::query() now takes &self instead of &mut self, user can issue multiple simultaneous queries without mutable borrowing.

Automatic query retry: Support automatic query retry on transient network or server-side error when obtaining the result stream in Client::query().

Retryable query stream: Introducing RetryableQueryStream as the returned type of Client::query(). This feature provides robust retry of network interruptions during data streaming.

When a connection is reset during streaming, the stream consumer has two options:

  • Option 1: Retry Query Stream
// When stream consumer continue polling after a ConnectionReset error:
// 1. The query is automatically reissued
// 2. Data streaming restarts from the beginning

// Example flow:
Poll 1:Received batch1
Poll 2:Received batch2
Poll 3:SpiceClientError::ConnectionReset error → Continue polling
Poll 4:Received batch1* (query restarted automatically)
Poll 5:Received batch2*
Poll 6:Received batch3*
...
  • Option 2: Stop polling
// Stream consumer can stop polling when it receives a ConnectionReset error
// The stream won't be retried

// Example flow:
Poll 1:Received batch1
Poll 2:Received batch2
Poll 3:SpiceClientError::ConnectionReset  error → Stop polling and handle error

Expanded support for query parameters: Support custom User-Agent and Cache-Control query metadata configurations.

Follow the Spice OSS quickstart to install and run the spice runtime locally, and query data using the spice-rs SDK:

use spiceai::ClientBuilder;

#[tokio::main]
async fn main() {
  let client = ClientBuilder::new().build().await.unwrap();

  let data = client.query(
    "SELECT trip_distance, total_amount FROM taxi_trips ORDER BY trip_distance DESC LIMIT 10;"
  ).await;
}

Contributors

Breaking Changes

  • Client::query() now takes &self instead of &mut self, and returns a retryable stream type RetryableQueryStream
// Old:
fn query(&mut self, sql: &str) -> FlightRecordBatchStream
// New:
fn query(&self, sql: &str) -> RetryableQueryStream

What's Changed

Full Changelog: v2.0.0...v3.0.0

v2.0

30 Apr 00:04
7ba9a46

Choose a tag to compare

Announcing spice-rs v2.0! 🎉

The v2.0 release adds full support for Spice OSS and now connects to localhost by default instead of the Spice Cloud service.

Follow the Spice OSS quickstart to install and run the spice runtime locally, and query data using the spice-rs SDK:

use spiceai::ClientBuilder;

#[tokio::main]
async fn main() {
  let mut client = ClientBuilder::new().build().await.unwrap();

  let data = client.query(
    "SELECT trip_distance, total_amount FROM taxi_trips ORDER BY trip_distance DESC LIMIT 10;"
  ).await;
}

Read the docs to learn more.

Breaking Changes

  • Asset Prices is now deprecated and the Prices() method and types were removed. Asset prices data can continue to be fetched using HTTP clients directly from the Spice cloud service.
  • The SDK now connects to localhost by default (API Key is now optional).

What's Changed

New Contributors

Full Changelog: v1.0.3...v2.0.0

v1.0.3

21 Mar 05:12
49f43c0

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.2...v1.0.3

v1.0.2

29 Nov 07:49
dce0d2a

Choose a tag to compare

What's Changed

Full Changelog: v1.0.1...v1.0.2

v1.0.1

24 Oct 10:06
da5e699

Choose a tag to compare

Announcing spice-rs v1.0.1! 🎉

Spice.ai is now generally available! Read the announcement blog post to see how Spice helps developers to build high-performance, highly-available, data and AI-driven applications.

spice-rs is the easiest way to query data in Rust from Spice.ai over a high-performance Apache Arrow connection.

Get started in 3 steps:

  1. Sign up for a free API key at Spice.ai
  2. Add spice-rs as a dependency in your Cargo.toml file.
  3. Import spice-rs, create a client and start querying Spice's built-in live-updating web3 data:
use spice_rs::new_spice_client;

let client = new_spice_client("API_KEY".to_string());
let data = client.query("SELECT * FROM eth.recent_blocks LIMIT 10;".to_string()).await;

Explore over 100+ built-in, real-time web3 datasets available in Spice.ai!

Have questions or feedback? Contact us

What's Changed

Full Changelog: v1.0.0...v1.0.1

v1.0.0.0

24 Oct 07:45
91c5823

Choose a tag to compare

Initial release of the Spice Rust SDK, spice-rs.