Skip to content

Commit e20527c

Browse files
cataggarbmc-msft
andauthored
update docs (#639)
Co-authored-by: bmc-msft <[email protected]>
1 parent c9cfe15 commit e20527c

File tree

8 files changed

+45
-41
lines changed

8 files changed

+45
-41
lines changed

FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Frequently Asked Questions
22

3-
## When will the crates be published to crates.io?
3+
## Why is it unofficial?
44

5-
We want them to be published soon too! [Milestones](https://github.com/Azure/azure-sdk-for-rust/milestones) have been created to help figure out issues remaining.
5+
This is an *unofficial* Azure SDK because it is not yet supported by Azure Support or the Azure SDK team. It has been built primarily by volunteers on their own time. For more information, see the [project history](HISTORY.md).
66

77
## How do we build a case for making it official?
88

HISTORY.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ They were last published in September of 2020 before moving the code to https://
2424
The above crates have become:
2525
- azure_core
2626
- azure_identity
27-
- azure_cosmos
27+
- azure_data_cosmos
2828
- azure_storage
29+
- azure_storage
30+
- azure_storage_blobs
31+
- azure_data_tables
32+
- azure_storage_queues
33+
34+
They were first published in January of 2022.
2935

3036
## azure-sdk-keyvault
3137

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1-
# \[Unofficial\] Azure SDK for Rust
1+
# Azure SDK for Rust
22

3-
This repository is for the development of the *unofficial* Azure SDK for Rust. It is *unofficial* because it is not yet supported by Azure Support or the Azure SDK team. It has been built primarily by volunteers on their own time. For more information, see the [project history](HISTORY.md) or [FAQs](FAQ.md):
4-
- When will the crates be published to crates.io?
5-
- How do we build a case for making it official?
3+
This repository is for the development of the [unofficial](https://github.com/Azure/azure-sdk-for-rust/blob/main/FAQ.md#why-is-it-unofficial) Azure SDK for Rust.
64

75
## Crates
86

7+
[All Azure SDK for Rust crates](https://crates.io/teams/github:azure:azure-sdk-publish-rust) are published on crates.io.
8+
99
### SDK
10-
These crates are available from in (sdk):
11-
- azure_core
12-
- azure_identity
13-
- azure_data_cosmos
14-
- azure_data_tables
15-
- azure_iot_hub
16-
- azure_security_keyvault
17-
- azure_storage_blobs
18-
- azure_storage_datalake
19-
- azure_storage_queues
10+
These [SDK crates](sdk) are available:
11+
- [azure_core](https://crates.io/crates/azure_core)
12+
- [azure_identity](https://crates.io/crates/azure_identity)
13+
- [azure_data_cosmos](https://crates.io/crates/azure_data_cosmos)
14+
- [azure_data_tables](https://crates.io/crates/azure_data_tables)
15+
- [azure_iot_hub](https://crates.io/crates/azure_iot_hub)
16+
- [azure_security_keyvault](https://crates.io/crates/azure_security_keyvault)
17+
- [azure_storage_blobs](https://crates.io/crates/azure_storage_blobs)
18+
- [azure_storage_datalake](https://crates.io/crates/azure_storage_datalake)
19+
- [azure_storage_queues](https://crates.io/crates/azure_storage_queues)
2020

2121
### Services
22-
More than 200 Azure service crates are available in [services](services). They are generated from the [Azure REST API Specifications](https://github.com/Azure/azure-rest-api-specs).
22+
Azure service crates generated from [Azure REST API Specifications](https://github.com/Azure/azure-rest-api-specs) are available in [services](services).
2323

2424
## Status
2525

26-
🚨🚨🚨**WARNING**: This project is currently under very active development.🚨🚨🚨
27-
28-
This projects' crates have yet to released to crates.io so in order to use them you will need to specify them as git dependencies. You should be aware that large, breaking changes can happen at any time, and thus it's not yet recommended to use these crates in any serious capacity yet.
26+
🚨 WARNING 🚨: This project is under active development. Be aware that large breaking changes will happen before 1.0 is reached.
2927

30-
Additionally, this project is the logical successor to the previous Azure SDK crates found under [github.com/MindFlavor/AzureSDKForRust](https://github.com/MindFlavor/AzureSDKForRust). The crates have been renamed, so those older crates should be considered fully deprecated.
28+
This project is the successor to the `azure_sdk*` crates from [MindFlavor/AzureSDKForRust](https://github.com/MindFlavor/AzureSDKForRust). The crates have been renamed, so those older crates should be considered fully deprecated. See [history](HISTORY.md) for more details.
3129

3230
## Project Structure
3331

_config.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

services/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Rust crates for accessing [Azure services](https://azure.microsoft.com/services/). These crates are client libraries generated by [AutoRust](autorust) using the web service [specifications](https://github.com/Azure/azure-rest-api-specs/tree/master/specification). The specifications are divided into two categories - [control plane and data plane](https://docs.microsoft.com/azure/azure-resource-manager/management/control-plane-and-data-plane). "You use the control plane to manage resources in your subscription. You use the data plane to use capabilities exposed by your instance of a resource type."
44

5-
When this document was last updated, there were 185 [control plane crates](mgmt) and 29 [data plane crates](svc).
5+
When this document was last updated, there were 202 [control plane crates](mgmt) with 1437 [tags](api-versions.md) and 38 [data plane crates](svc) with 139 [tags](api-versions.md).
66

77
## Control Plane Crates
88
The control plane crates are named `azure_mgmt_${servicename}`, such as `azure_mgmt_storage`.
@@ -39,5 +39,3 @@ azure_core = "0.1"
3939
azure_identity = "0.1"
4040
azure_svc_batch = "0.1"
4141
```
42-
43-
Each crate may support several [API versions](api-versions.md).

services/api-versions.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# API Versions
22

3-
Each service may have multiple API versions. Each API version has a set of OpenAPI 2.0 documents, listed under a `Tag` in a [readme.md](https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md) file in a `Configuration` section. Sometimes there are multiple `Tag`s for the same API version. For example, [Tag: package-2018-07](https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md#tag-package-2018-07) and [Tag: package-2018-07-only](https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md#tag-package-2018-07-only). Rust code is generated for each tag and organized as a crate feature. The first tag without `-preview` is selected as the default feature:
3+
A `Configuration` section `Tag` in a `readme.md` represents a set of operations for an Azure service for generating a client SDK. Ideally, there is a single tag representing an API version for a service.
44

5+
Unfortunately, some services use [multiple API versions](https://github.com/Azure/azure-sdk-for-rust/issues/563) in their tags. In this case, different service operations will use different API versions of the same service.
6+
7+
Using the `azure_mgmt_storage` crate as an example. It is generated from the [specification/storage/resource-manager/readme.md](https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md). In its [Cargo.toml](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/mgmt/storage/Cargo.toml), you can see the list of `features`. A crate feature is generated for each tag. The first tag without `-preview` is selected as the default. In its [lib.rs](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/mgmt/storage/src/lib.rs), you can see that a module is generated for each tag as well.
8+
9+
Here is an example `Cargo.toml`.
510
``` toml
611
[features]
712
default = ["package-2019-06"]
@@ -12,38 +17,30 @@ default = ["package-2019-06"]
1217
"package-2018-07" = []
1318
"package-2018-07-only" = []
1419
"package-2018-03" = []
15-
"package-2018-02" = []
16-
"package-2017-10" = []
17-
"package-2017-06" = []
18-
"package-2016-12" = []
19-
"package-2016-05" = []
20-
"package-2016-01" = []
21-
"package-2015-06" = []
22-
"package-2015-05-preview" = []
2320
```
2421

25-
The default feature will be used when this dependency is specified:
22+
The default tag will be used when this dependency is specified as:
2623
``` toml
2724
[dependencies]
28-
azure_mgmt_storage = { git = "https://github.com/Azure/azure-sdk-for-rust" }
25+
azure_mgmt_storage = "0.1"
2926
```
3027

3128
To use another tag, for example to try out the newer preview API, you must disable the default:
3229
``` toml
3330
[dependencies]
34-
azure_mgmt_storage = { git = "https://github.com/Azure/azure-sdk-for-rust", default-features = false, features = ["package-2020-08-preview"] }
31+
azure_mgmt_storage = { version = "0.1", default-features = false, features = ["package-2020-08-preview"] }
3532
```
3633

3734
A few use cases require using more than tag. This can be accomplished a couple of ways. Specify the feature `no-default-version` and the other tags you wish to use.
3835

3936
``` toml
4037
[dependencies]
41-
azure_mgmt_storage = { git = "https://github.com/Azure/azure-sdk-for-rust", features = ["no-default-version", "package-2019-06", "package-2018-02"] }
38+
azure_mgmt_storage = { version = "0.1", features = ["no-default-version", "package-2019-06", "package-2018-02"] }
4239
```
4340

4441
Or it can be done by [renaming the dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml):
4542
``` toml
4643
[dependencies]
47-
azure_mgmt_storage_2019_06 = { package = "azure_mgmt_storage", git = "https://github.com/Azure/azure-sdk-for-rust", default-features = false, features = ["package-2019-06"] }
48-
azure_mgmt_storage_2018_02 = { package = "azure_mgmt_storage", git = "https://github.com/Azure/azure-sdk-for-rust", default-features = false, features = ["package-2018-02"] }
44+
azure_mgmt_storage_2019_06 = { package = "azure_mgmt_storage", version = "0.1", default-features = false, features = ["package-2019-06"] }
45+
azure_mgmt_storage_2018_02 = { package = "azure_mgmt_storage", version = "0.1", default-features = false, features = ["package-2018-02"] }
4946
```

services/autorust/codegen/examples/mgmt_tags.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ use autorust_codegen::get_mgmt_readmes;
55
pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
66

77
fn main() -> Result<()> {
8+
let mut tag_count = 0;
89
for (i, spec) in get_mgmt_readmes()?.iter().enumerate() {
910
println!("{} {}", i + 1, spec.spec());
1011
for config in spec.configs()? {
1112
println!(" {}", &config.tag);
1213
for input_file in &config.input_files {
1314
println!(" {}", input_file);
1415
}
16+
tag_count += 1;
1517
}
1618
}
19+
println!("{} tags", tag_count);
1720
Ok(())
1821
}

services/autorust/codegen/examples/svc_tags.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ use autorust_codegen::{self, get_svc_readmes};
55
pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
66

77
fn main() -> Result<()> {
8+
let mut tag_count = 0;
89
for (i, spec) in get_svc_readmes()?.iter().enumerate() {
910
println!("{} {}", i + 1, spec.spec());
1011
for config in spec.configs()? {
1112
println!(" {}", &config.tag);
1213
for input_file in &config.input_files {
1314
println!(" {}", input_file);
1415
}
16+
tag_count += 1;
1517
}
1618
}
19+
println!("{} tags", tag_count);
1720
Ok(())
1821
}

0 commit comments

Comments
 (0)