add cli args

This commit is contained in:
mae
2026-07-14 07:54:18 -05:00
parent 1825b9a90b
commit 61a317fa79
3 changed files with 33 additions and 2 deletions
+51
View File
@@ -0,0 +1,51 @@
package cargo
type CargoManifest struct {
Package `toml:"package"`
Library Target `toml:"lib"`
Binaries []Target `toml:"bin"`
Tests []Target `toml:"test"`
Dependencies map[string]Dependency `toml:"dependencies"`
BuildDependencies map[string]Dependency `toml:"build-dependencies"`
DevDependencies map[string]Dependency `toml:"dev-dependencies"`
Target TargetTable `toml:"target"`
}
type Package struct {
Name string `toml:"name"`
Version string `toml:"version"`
Edition string `toml:"edition"`
RustVersion string `toml:"rust-version"`
Workspace string `toml:"workspace"`
Build string `toml:"build"`
Links string `toml:"links"`
Autolib bool `toml:"autolib"`
Autobins bool `toml:"autobins"`
Autotests bool `toml:"autotests"`
Resolver string `toml:"resolver"`
}
type Target struct {
Name string `toml:"name"`
Path string `toml:"path"`
Test bool `toml:"test"`
ProcMacro bool `toml:"proc-macro"`
Harness bool `toml:"harness"`
CrateType []string `toml:"crate-type"`
RequiredFeatures []string `toml:"required-features"`
}
// n.b. only crates.io and local dependencies are supported.
type Dependency struct {
Version string `toml:"version"`
Path string `toml:"path"`
DefaultFeatures bool `toml:"default-features"`
Features []string `toml:"features"`
Optional bool `toml:"optional"`
Package string `toml:"package"`
Workspace string `toml:"workspace"`
}
type DependenciesTable struct {
Dependencies map[string]Dependency `toml:"dependencies"`
}
type TargetTable map[string]DependenciesTable