MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / resolve

Function resolve

cli/src/pkg.rs:65–73  ·  view source on GitHub ↗

Resolve `name` for the runtime: user manifest entry first, registry fallback.

(name: &str, manifest: &Manifest)

Source from the content-addressed store, hash-verified

63
64/// Resolve `name` for the runtime: user manifest entry first, registry fallback.
65pub fn resolve(name: &str, manifest: &Manifest) -> Option<(Kind, String)> {
66 if let Some(url) = manifest.imports.get(name) {
67 return Some((Kind::Std, url.clone()));
68 }
69 if let Some(url) = manifest.host.get(name) {
70 return Some((Kind::Host, url.clone()));
71 }
72 registry(name)
73}
74
75pub fn add(path: &Path, pkgs: &[String]) -> Result<()> {
76 if pkgs.is_empty() {

Callers 2

vendor_packagesFunction · 0.70
openMethod · 0.50

Calls 2

registryFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected