Skip to content

Commit e506d81

Browse files
danieljurekCopilot
andauthored
Documentation updates (#3402)
Fixes #2043 Fixes #2044 Documents pipeline checks and outlines dependency/version strategy. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1bc0ef3 commit e506d81

File tree

2 files changed

+131
-0
lines changed

2 files changed

+131
-0
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,34 @@ There are samples of performance tests under `sdk/core/azure_core/benches` folde
365365
To execute the performance tests in `azure_core` folder you can run `cargo bench` in the `sdk/core/azure_core` folder.
366366
The output of the tests will be presented in the command line as well as saved under the `target/criterion` folder.
367367

368+
## Releases
369+
370+
### Versions
371+
372+
To provide a helpful versioning experience, the Azure SDK for Rust libraries follow conventions similar to other Azure SDKs.
373+
374+
Release builds will fail if a library depends on another Azure SDK for Rust library which has not been released and is not included in the current release build.
375+
376+
#### Workspace dependencies
377+
378+
The root `Cargo.toml` file represents released versions of crates which can be used by other Azure SDK for Rust libraries. To use a released version of a library, use `workspace = true` in your library's `Cargo.toml`.
379+
380+
```toml
381+
azure_core = { workspace = true }
382+
```
383+
384+
If an SDK library depends on an unreleased SDK library, specify that dependency using a path-based dependency (`version` is required for the library to release):
385+
386+
```toml
387+
azure_core = { path = "../../core/azure_core", version = "0.31.0" }
388+
```
389+
390+
#### Version increment on release
391+
392+
When a release to crates.io completes, the Engineering System opens a pull request to increment versions of released packages. This PR should be merged as soon as possible to put the `main` branch in a "releasable" state and to provide context that code at the HEAD of `main` may not reflect code in a previously released version of a library.
393+
394+
The incremented version will be a "beta" of an incrementally higher release. This incremented version in the PR is a placeholder. The version can be updated in another PR to reflect the intended release version.
395+
368396
## Samples
369397

370398
### Third-party dependencies

doc/checks.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Engineering System checks
2+
3+
These checks run in addition to logic tests.
4+
5+
## Standard checks
6+
7+
The Engineering System provides a set of [standard checks](https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/1215/Source-and-Artifact-scans-and-checks).
8+
9+
## Rust-specific checks
10+
11+
### Checks included in `cargo`
12+
13+
The following checks are included in the Rust toolchain or are part of cargo.
14+
15+
#### Audit
16+
17+
Documentation: [cargo-audit](https://github.com/rustsec/rustsec/tree/main/cargo-audit)
18+
19+
Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1)
20+
21+
```
22+
cargo audit
23+
```
24+
25+
#### Fmt
26+
27+
Documentation: [cargo-fmt](https://doc.rust-lang.org/cargo/commands/cargo-fmt.html)
28+
29+
Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1)
30+
31+
```
32+
cargo fmt
33+
```
34+
35+
#### Clippy
36+
37+
Documentation: [cargo-clippy](https://doc.rust-lang.org/cargo/commands/cargo-clippy.html)
38+
39+
Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1)
40+
41+
```
42+
cargo clippy
43+
```
44+
45+
#### Check
46+
47+
> [!NOTE]
48+
> This only runs against `azure-core` and not against other packages in the build
49+
50+
Documentation: [cargo-check](https://doc.rust-lang.org/cargo/commands/cargo-check.html)
51+
52+
Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1)
53+
54+
```
55+
cargo check
56+
```
57+
58+
#### Doc
59+
60+
Documentation: [cargo-doc](https://doc.rust-lang.org/cargo/commands/cargo-doc.html)
61+
62+
Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1)
63+
64+
```
65+
cargo doc
66+
```
67+
68+
#### Docs-rs
69+
70+
Documentation: [cargo-docs-rs](https://github.com/dtolnay/cargo-docs-rs)
71+
72+
Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1)
73+
74+
```
75+
cargo install --locked cargo-docs-rs
76+
cargo +nightly docs-rs
77+
```
78+
79+
### Checks installed as tools
80+
81+
Additional checks can be installed as tools by `cargo install` and run in relevant parts of the build system.
82+
83+
### Deny
84+
85+
Documentation: [cargo-deny](https://github.com/EmbarkStudios/cargo-deny)
86+
87+
Runs in [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1)
88+
89+
```
90+
cargo install cargo-deny
91+
cargo deny
92+
```
93+
94+
### Semver
95+
96+
Documentation: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks)
97+
98+
Runs in [Test-Semver.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Test-Semver.ps1)
99+
100+
```
101+
cargo install cargo-semver-checks
102+
cargo semver-checks
103+
```

0 commit comments

Comments
 (0)