README: add an "Upgrading from yaml-rust" section

This commit is contained in:
David Aguilar 2024-03-19 23:34:17 -07:00 committed by Ethiraric
parent 6dc586e892
commit 1e43066d15

View file

@ -87,6 +87,21 @@ This implementation is fully compatible with the YAML 1.2 specification. In
order to help with compliance, `yaml-rust2` tests against (and passes) the [YAML
test suite](https://github.com/yaml/yaml-test-suite/).
## Upgrading from yaml-rust
You can use `yaml-rust2` as a drop-in replacement for the original `yaml-rust` crate.
```toml
[dependencies]
yaml-rust = { version = "#.#", package = "yaml-rust2" }
```
This `Cargo.toml` declaration allows you to refer to this crate as `yaml_rust` in your code.
```rust
use yaml_rust::{YamlLoader, YamlEmitter};
```
## License
Licensed under either of