about summary refs log tree commit diff
path: root/ops/yandex-cloud-rs/README.md
blob: 76d80c760ed9928abc07609e3b6f5ee013825859 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
yandex-cloud-rs
===============

Client library for Yandex Cloud gRPC APIs, as published in their
[GitHub repository][repo].

Please see the [online documentation][docs] for user-facing
information, this README is intended for library developers.

The source code of the library lives [in the TVL repository][code].

-------------

In order to build this library, the gRPC API definitions need to be
fetched from GitHub. By default this is done by Nix (see
`default.nix`), which then injects the location of the API definitions
through the `YANDEX_CLOUD_PROTOS` environment variable.

The actual code generation happens through the calls in `build.rs`.

Releases of this library are done from *dirty* trees, meaning that the
version on crates.io should already contain all the generated code. In
order to do this, after bumping the version in `Cargo.toml` and the
API commit in `default.nix`, the following release procedure should be
used:

```
# Get rid of all generated source files
cd src
ls | grep -v '^lib.rs$' | xargs rm
cd ..

# Get rid of all old artefacts
cargo clean

# Verify that a clean build works as intended
cargo build

# Verify that all documentation builds, and verify that it looks fine:
#
# - Is the version correct (current date)?
# - Are all the services included (i.e. not an accidental empty build)?
cargo doc --open

# If everything looks fine, release:
cargo publish --allow-dirty
```

[repo]: https://github.com/yandex-cloud/cloudapi
[docs]: https://docs.rs/yandex-cloud/latest/yandex_cloud/
[code]: https://cs.tvl.fyi/depot/-/tree/ops/yandex-cloud-rs