- Rust 99.3%
- Shell 0.3%
- Smarty 0.2%
- Just 0.1%
## 🤖 New release * `s2-common`: 0.40.0 -> 0.40.1 (✓ API compatible changes) * `s2-api`: 0.30.5 -> 0.30.6 (✓ API compatible changes) * `s2-resource-spec`: 0.1.2 -> 0.2.0 (⚠ API breaking changes) * `s2-storage`: 0.2.0 -> 0.2.1 (✓ API compatible changes) * `s2-lite`: 0.37.1 -> 0.37.2 (✓ API compatible changes) * `s2-sdk`: 0.31.7 -> 0.31.8 (✓ API compatible changes) * `s2-cli`: 0.37.1 -> 0.37.2 * `s2-testcontainers`: 0.37.1 -> 0.37.2 (✓ API compatible changes) ### ⚠ `s2-resource-spec` breaking changes ```text --- failure inherent_method_missing: pub method removed or renamed --- Description: A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/inherent_method_missing.ron Failed in: RetentionPolicy::age_secs, previously in file /tmp/.tmplkkHNJ/s2-resource-spec/src/lib.rs:134 ``` <details><summary><i><b>Changelog</b></i></summary><p> ## `s2-common` <blockquote> ## [0.40.1] - 2026-07-02 ### Miscellaneous Tasks - Remove unused From<ReadUntil> for Option<Timestamp> ([#594](https://github.com/s2-streamstore/s2/issues/594)) <!-- generated by git-cliff --> </blockquote> ## `s2-api` <blockquote> ## [0.30.6] - 2026-07-02 ### Miscellaneous Tasks - Update Cargo.toml dependencies <!-- generated by git-cliff --> </blockquote> ## `s2-resource-spec` <blockquote> ## [0.2.0] - 2026-07-02 ### Miscellaneous Tasks - Remove unused RetentionPolicy::age_secs method ([#597](https://github.com/s2-streamstore/s2/issues/597)) <!-- generated by git-cliff --> </blockquote> ## `s2-storage` <blockquote> ## [0.2.1] - 2026-07-02 ### Miscellaneous Tasks - Update Cargo.toml dependencies <!-- generated by git-cliff --> </blockquote> ## `s2-lite` <blockquote> ## [0.37.2] - 2026-07-02 ### Miscellaneous Tasks - Update Cargo.toml dependencies <!-- generated by git-cliff --> </blockquote> ## `s2-sdk` <blockquote> ## [0.31.8] - 2026-07-02 ### Documentation - Add encryption examples for central docs site ([#590](https://github.com/s2-streamstore/s2/issues/590)) - Add S2_ENCRYPTION_KEY to SDK examples env vars ([#600](https://github.com/s2-streamstore/s2/issues/600)) ### Miscellaneous Tasks - Dep upgrades ([#582](https://github.com/s2-streamstore/s2/issues/582)) - Remove unused Error::is_connect method from sdk client ([#606](https://github.com/s2-streamstore/s2/issues/606)) <!-- generated by git-cliff --> </blockquote> ## `s2-cli` <blockquote> ## [0.37.2] - 2026-07-02 ### Features - Explicit exact/prefix flags for issue-access-token scopes ([#611](https://github.com/s2-streamstore/s2/issues/611)) ### Bug Fixes - Tui reconfigure can clear timestamping uncapped to inherit ([#605](https://github.com/s2-streamstore/s2/issues/605)) - Allow re-editing a custom basin location typed before locations load ([#607](https://github.com/s2-streamstore/s2/issues/607)) - Correlate benchmark events by run id to drop stale ones ([#608](https://github.com/s2-streamstore/s2/issues/608)) ### Miscellaneous Tasks - Remove unnecessary #[allow(dead_code)] on RetentionPolicy::Age ([#592](https://github.com/s2-streamstore/s2/issues/592)) - Remove unused From<S2UriParseError> for CliError impl ([#612](https://github.com/s2-streamstore/s2/issues/612)) <!-- generated by git-cliff --> </blockquote> ## `s2-testcontainers` <blockquote> ## [0.37.2] - 2026-07-02 ### Miscellaneous Tasks - Update Cargo.toml dependencies <!-- generated by git-cliff --> </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). --------- Co-authored-by: release-pleaze[bot] <262023388+release-pleaze[bot]@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Shikhar Bhushan <shikhar@s2.dev> |
History
|
|
|---|---|---|
| .claude/skills/release | ||
| .github/workflows | ||
| api | ||
| assets | ||
| charts/s2-lite-helm | ||
| cli | ||
| common | ||
| docs/adr | ||
| hooks | ||
| lite | ||
| resource-spec | ||
| sdk | ||
| sim | ||
| storage | ||
| testcontainers | ||
| .gitignore | ||
| .gitmodules | ||
| .rustfmt.toml | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| cliff.toml | ||
| Cross.toml | ||
| deny.toml | ||
| Dockerfile | ||
| install.sh | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
| release-plz.toml | ||
s2.dev is a serverless datastore for real-time, streaming data.
This repository contains:
- s2-cli - The official S2 command-line interface
- s2-lite - An open source, self-hostable server implementation of the S2 API
- s2-sdk - The official Rust SDK for S2
Installation
Homebrew (macOS/Linux)
brew install s2-streamstore/s2/s2
Cargo
cargo install --locked s2-cli
Release Binaries (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/s2-streamstore/s2/main/install.sh | bash
Or specify a version with VERSION=x.y.z before the command. See all releases.
Docker
docker pull ghcr.io/s2-streamstore/s2
s2-lite
s2-lite is embedded as the s2 lite subcommand of the CLI. It's a self-hostable server implementation of the S2 API.
It uses SlateDB as its storage engine, which relies entirely on object storage for durability.
It is easy to run s2 lite against object stores like AWS S3 and Tigris. It is a single-node binary with no other external dependencies.
You can also simply not specify a --bucket, which makes it operate entirely in-memory (or use --local-root to persist to local disk instead).
Tip
When you point lite at a
--bucket, data is always durable on object storage before being acknowledged or returned to readers — just like s2.dev.The optional in-memory mode (no
--bucketor--local-rootspecified) just makes it an effective S2 emulator for integration tests.
Quickstart
Here's how you can run in-memory without any external dependency:
# Using Docker
docker run -p 8080:80 ghcr.io/s2-streamstore/s2 lite
# Or directly with the CLI
s2 lite --port 8080
AWS S3 bucket example
docker run -p 8080:80 \
-e AWS_PROFILE=${AWS_PROFILE} \
-v ~/.aws:/home/nonroot/.aws:ro \
ghcr.io/s2-streamstore/s2 lite \
--bucket ${S3_BUCKET} \
--path s2lite
Static credentials example (Tigris, R2 etc)
docker run -p 8080:80 \
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
-e AWS_ENDPOINT_URL_S3=${AWS_ENDPOINT_URL_S3} \
ghcr.io/s2-streamstore/s2 lite \
--bucket ${S3_BUCKET} \
--path s2lite
Note
Point the S2 CLI or SDKs at your lite instance like this:
export S2_ACCOUNT_ENDPOINT="http://localhost:8080" export S2_BASIN_ENDPOINT="http://localhost:8080" export S2_ACCESS_TOKEN="ignored"
Let's make sure the server is ready:
while ! curl -sf ${S2_ACCOUNT_ENDPOINT}/health -o /dev/null; do echo Waiting...; sleep 2; done && echo Up!
Install the CLI (see Installation above) or upgrade if s2 --version is older than 0.26
Let's create a basin with auto-creation of streams enabled:
s2 create-basin liteness --create-stream-on-append --create-stream-on-read
Test your performance:
s2 bench liteness --target-mibps 10 --duration 5s --catchup-delay 0s
Now let's try streaming sessions. In one or more new terminals (make sure you re-export the env vars noted above),
s2 read s2://liteness/starwars 2> /dev/null
Now back from your original terminal, let's write to the stream:
nc starwars.s2.dev 23 | s2 append s2://liteness/starwars
Kubernetes Deployment
Deploy s2-lite to Kubernetes using Helm. See the Helm chart documentation for installation instructions and configuration options.
Monitoring
/health will return 200 on success for readiness and liveness checks
/metrics returns Prometheus text format
Internals
SlateDB settings
Use SL8_ prefixed environment variables, e.g.:
# Defaults to 50ms for remote bucket / 5ms in-memory
SL8_FLUSH_INTERVAL=10ms
Design
- HTTP serving is implemented using axum
- Each stream corresponds to a Tokio task called
streamerthat owns the currenttailposition, serializes appends, and broadcasts acknowledged records to followers - Appends are pipelined to improve performance against high-latency object storage
lite::backend::kv::Keydocuments the data modeling in SlateDB
Compatibility
- CLI ✅ v0.26+
- TypeScript SDK ✅ v0.22+
- Go SDK ✅ v0.11+
- Rust SDK ✅ v0.22+
- Python SDK ✅ v0.1+
API Coverage
Complete specs are available:
Important
Unlike the cloud service where the basin is implicit as a subdomain,
/streams/*requests must specify the basin using theS2-Basinheader. The SDKs take care of this automatically.
| Endpoint | Support |
|---|---|
/basins |
Supported |
/streams |
Supported |
/streams/{stream}/records |
Supported |
/access-tokens |
Not supported https://github.com/s2-streamstore/s2/issues/28 |
/metrics |
Not supported |

