Skip to content

Commit 3af8eb9

Browse files
authored
Update readme to include guidance on version ranges for dependencies (microsoft#3754)
1 parent 2b37e78 commit 3af8eb9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

crates/libs/sys/readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ Start by adding the following to your Cargo.toml file:
1111

1212
```toml
1313
[dependencies.windows-sys]
14-
version = "0.61"
14+
version = ">=0.59, <=0.61"
1515
features = [
1616
"Win32_Security",
1717
"Win32_System_Threading",
1818
"Win32_UI_WindowsAndMessaging",
1919
]
2020
```
2121

22+
Using a range instead of the [default Caret requirements](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements) helps avoid duplicate versions in downstream graphs and improves resolver flexibility.
23+
2224
Make use of any Windows APIs as needed:
2325

2426
```rust,no_run
@@ -36,3 +38,5 @@ unsafe {
3638
MessageBoxW(0 as _, w!("Wide"), w!("Caption"), MB_OK);
3739
}
3840
```
41+
42+

crates/libs/windows/readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Start by adding the following to your Cargo.toml file:
1111

1212
```toml
1313
[dependencies.windows]
14-
version = "0.62"
14+
version = ">=0.59, <=0.62"
1515
features = [
1616
"Data_Xml_Dom",
1717
"Win32_Security",
@@ -20,6 +20,8 @@ features = [
2020
]
2121
```
2222

23+
Using a range instead of the [default Caret requirements](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements) helps avoid duplicate versions in downstream graphs and improves resolver flexibility.
24+
2325
Make use of any Windows APIs as needed:
2426

2527
```rust,no_run

0 commit comments

Comments
 (0)