Update the `windows` Microsoft Windows binding crate to 0.58.
- Update `taskcluster/kinds/fetch/toolchains.yml` to request version
0.58 of the `windows` crate.
- Update `build/rust/windows/Cargo.toml` to present itself as 0.58.
- Vendor the following new crates into `third_party/rust`:
- windows-core
- windows-implement
- windows-interface
- windows-result
- windows-strings
- Update `supply-chain/imports.lock` as necessary.
Differential Revision: https://phabricator.services.mozilla.com/D218694
Windows string types
The windows-strings crate provides common Windows string types used by various Windows APIs.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-strings]
version = "0.1"
Use the Windows string types as needed:
use windows_strings::*;
const A: PCSTR = s!("ansi");
const W: PCWSTR = w!("wide");
fn main() -> Result<()> {
let b = BSTR::from("bstr");
let h = HSTRING::from("hstring");
assert_eq!(b, "bstr");
assert_eq!(h, "hstring");
assert_eq!(unsafe { A.to_string()? }, "ansi");
assert_eq!(unsafe { W.to_string()? }, "wide");
Ok(())
}