Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions rust/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
## WIP
Not ready for use !!
# Versioned Storage Service (Rust)

This directory hosts the Rust-based implementation of the Versioned Storage Service (VSS).

### Prerequisites

- Install Rust and Cargo (https://www.rust-lang.org/tools/install).
- Install PostgreSQL 15 (https://www.postgresql.org/download/)

### Building

```
git clone https://github.com/lightningdevkit/vss-server.git
cd vss-server/rust

cargo build --release
```

### Running
1. **Edit Configuration**: Modify `./vss_server_config.toml` to set application configuration and
environment variables as needed. Add PostgreSQL endpoint configuration.
2. Create table in PostgreSQL using `./impls/src/postgres/sql/`
3. Start server:
```
cargo run -- vss-server-config.toml
```
3. VSS endpoint should be reachable at `http://localhost:8080/vss`.

### Configuration

Refer `./vss_server_config.toml` to see available configuration options.

### Support

If you encounter any issues or have questions, feel free to open an issue on
the [GitHub repository](https://github.com/lightningdevkit/vss-server/issues). For further assistance or to discuss the
development of VSS, you can reach out to us in the [LDK Discord](https://discord.gg/5AcknnMfBw) in the `#vss` channel.

[LDK Discord]: https://discord.gg/5AcknnMfBw
10 changes: 10 additions & 0 deletions rust/impls/src/postgres/sql/v0_create_vss_db.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE vss_db (
user_token character varying(120) NOT NULL CHECK (user_token <> ''),
store_id character varying(120) NOT NULL CHECK (store_id <> ''),
key character varying(600) NOT NULL,
value bytea NULL,
version bigint NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
last_updated_at TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (user_token, store_id, key)
);