Skip to content

Commit c65ac17

Browse files
committed
readme
1 parent 074e2ff commit c65ac17

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

crates/libs/metadata/readme.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,38 @@
11
## Low-level metadata library for ECMA-335
2+
3+
The [windows-metadata](https://crates.io/crates/windows-metadata) crate provides a reader and writer
4+
for the ECMA-335 metadata format used by .NET, WinRT, and more recently the Win32 metadata.
5+
6+
* [Getting started](https://kennykerr.ca/rust-getting-started/)
7+
* [Samples](https://github.com/microsoft/windows-rs/tree/master/crates/samples)
8+
* [Releases](https://github.com/microsoft/windows-rs/releases)
9+
10+
Start by adding the following to your Cargo.toml file:
11+
12+
```toml
13+
[dependencies.windows-metadata]
14+
version = "0.59"
15+
```
16+
17+
Use the Windows metadata support as needed. Here is how you might use the reader to query type information:
18+
19+
```rust,no_run
20+
use windows_metadata::*;
21+
22+
let index = reader::Index::read("Windows.winmd").unwrap();
23+
24+
let def = index.expect("Windows.Foundation", "Point");
25+
assert_eq!(def.namespace(), "Windows.Foundation");
26+
assert_eq!(def.name(), "Point");
27+
28+
let extends = def.extends().unwrap();
29+
assert_eq!(extends.namespace(), "System");
30+
assert_eq!(extends.name(), "ValueType");
31+
32+
let fields: Vec<_> = def.fields().collect();
33+
assert_eq!(fields.len(), 2);
34+
assert_eq!(fields[0].name(), "X");
35+
assert_eq!(fields[1].name(), "Y");
36+
assert_eq!(fields[0].ty(), Type::F32);
37+
assert_eq!(fields[1].ty(), Type::F32);
38+
```

crates/libs/services/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Start by adding the following to your Cargo.toml file:
1010

1111
```toml
1212
[dependencies.windows-services]
13-
version = "0.0"
13+
version = "0.24"
1414
```
1515

1616
Use the Windows services support as needed. Here is how you might write a simple Windows services process:

crates/libs/threading/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Start by adding the following to your Cargo.toml file:
1010

1111
```toml
1212
[dependencies.windows-threading]
13-
version = "0.0"
13+
version = "0.1"
1414
```
1515

1616
Use the Windows threading support as needed. Here is how you might submit a closure to run on the default thread pool:

0 commit comments

Comments
 (0)