Skip to content

Commit

Permalink
Merge pull request #216 from polRk/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
rekby authored Dec 5, 2024
2 parents 6bbdf8a + 8329a9f commit c882b4c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/scripts/version-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function version_set() {
local VERSION="$2"

sed -i.bak -e "s/^version *=.*/version = \"$VERSION\"/" "$CRATE_NAME/Cargo.toml"
sed -i -e "s/^ydb *=.*/ydb = \"$VERSION\"/" "README.md"
}

function version_dep_set() {
Expand Down
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
[![YDB tests](https://github.com/ydb-platform/ydb-rs-sdk/actions/workflows/rust-tests.yml/badge.svg?branch=master&event=schedule)](https://github.com/ydb-platform/ydb-rs-sdk/actions/workflows/rust-tests.yml)

Rust SDK for YDB.
Supported rust: 1.60.0 and newer.

Integration tests, with dependency from real YDB database marked as ignored.
To run it:
1. Set YDB_CONNECTION_STRING env
2. run cargo test -- --include-ignored
### Prerequisites
Rust 1.60.0 or newer

### Installation
Add the YDB dependency to your project using `cargo add ydb` or add this your Cargo.toml:
```toml
[dependencies]
ydb = "0.9.4"
```

### Example
Create a new Rust file (e.g., main.rs) and add the following code:

# Example
```rust
use ydb::{ClientBuilder, Query, StaticToken, YdbResult};

Expand Down Expand Up @@ -49,10 +55,14 @@ async fn main() -> YdbResult<()> {
}
```

# More examples
[Url shorneter application](https://github.com/ydb-platform/ydb-rs-sdk/tree/master/ydb-example-urlshortener)
For more examples, check out the [URL shortener application](https://github.com/ydb-platform/ydb-rs-sdk/tree/master/ydb-example-urlshortener) or [many small examples](https://github.com/ydb-platform/ydb-rs-sdk/tree/master/ydb/examples).

## Tests

[Many small examples](https://github.com/ydb-platform/ydb-rs-sdk/tree/master/ydb/examples)
Integration tests, with dependency from real YDB database marked as ignored.
To run it:
1. Set YDB_CONNECTION_STRING env
2. run cargo test -- --include-ignored

# Version policy

Expand Down

0 comments on commit c882b4c

Please sign in to comment.