Skip to content

Main content

Cargo Dependency Rename Package Pair Tool

Compute cargo dependency rename package pair from explicit bounded inputs.

Loading tool…

Description

Compare local and package names in a Cargo rename record.

Package and container references combine names, selectors, conditions and platform metadata. A restricted lexical split can preserve these parts without validating registry identity, available targets, dependency graphs or runtime resolution.

Compare local and package names in a Cargo rename record.

When to use this tool

Use Cargo Dependency Rename Package Pair when checking the stated package, Cargo or container-reference component.

How to use the tool and how it works

  1. Enter localName, packageName. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read renamed, cargoFeaturePrefix. Inspect renamed before interpreting the associated values.

Compare local and package names in a Cargo rename record. Require nonempty ASCII alphanumeric/underscore/hyphen names; renamed checks exact inequality and cargoFeaturePrefix is dep: plus localName.1

Input fieldMeaning and unitsAccepted input
localNameLocal NameRequired. Text; maximum UTF-16 length 8192.
packageNamePackage NameRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
renamedRenamedRequired. Boolean.
cargoFeaturePrefixCargo Feature PrefixRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "localName": "serde1",
    "packageName": "serde"
  },
  "output": {
    "renamed": true,
    "cargoFeaturePrefix": "dep:serde1"
  }
}

Limitations and assumptions

  • No manifest is read, package resolved or Cargo naming restriction beyond this grammar enforced.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use the relevant package manager, runtime or registry against the actual project for complete resolution and validation.

References

  1. Calculation and input contract: development/cargo-dependency-rename-package-pair — tool.io

Similar or alternative tools