use-composer-json 0.0.1

Composer JSON metadata primitives for RustUse.
Documentation
  • Coverage
  • 11.84%
    9 out of 76 items documented1 out of 58 items with examples
  • Size
  • Source code size: 13.36 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-php
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-composer-json

Composer JSON metadata primitives for RustUse.

Experimental

use-composer-json is experimental while use-php remains below 0.3.0.

Example

use use_composer_json::{ComposerJson, ComposerPackageName, ComposerRequirement};

let package = ComposerJson::new()
    .with_name(ComposerPackageName::new("acme/demo")?)
    .with_requirement("php", ComposerRequirement::new("^8.2")?);

assert_eq!(package.name().unwrap().vendor(), "acme");
assert!(package.requirements().contains_key("php"));
# Ok::<(), use_composer_json::ComposerJsonError>(())

Scope

  • Composer package names, requirements, scripts, repositories, autoload config metadata, stability labels, and package types.

Non-goals

  • Dependency resolution, lockfile parsing, plugin execution, repository fetching, or package installation.

License

Licensed under either Apache-2.0 or MIT.