#cargo-toml #validate #fields #present #error #file #err

cargo_toml_validate

Makes sure that Cargo.toml has all required fields present

1 stable release

Uses old Rust 2015

1.0.0 May 20, 2017

#17 in #present

MIT license

6KB
145 lines

cargo_toml_validate

This is a crate which helps to validate if all mandatory fields in a Cargo.toml file are present.

Usage


let cargo_toml = "...";

match cargo_toml_validate::validate(cargo_toml) {
    Ok(()) => { /* Everything's fine */ },
    Err(errors) => {
        for error in errors {
          println!("{:?}", error);
        }
    }
}

It validates the following fields:

  • description
  • license
  • license-file
  • homepage
  • repository

License

MIT

Dependencies

~250–490KB
~11K SLoC