MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / host_arch

Function host_arch

atomic-repository/src/oci.rs:66–73  ·  view source on GitHub ↗

Map the host architecture (`std::env::consts::ARCH`) to its OCI name. `"aarch64"` becomes `"arm64"`, `"x86_64"` becomes `"amd64"`; any other value is passed through unchanged.

()

Source from the content-addressed store, hash-verified

64/// `"aarch64"` becomes `"arm64"`, `"x86_64"` becomes `"amd64"`; any other value
65/// is passed through unchanged.
66pub fn host_arch() -> String {
67 match std::env::consts::ARCH {
68 "aarch64" => "arm64",
69 "x86_64" => "amd64",
70 other => other,
71 }
72 .to_string()
73}
74
75/// Build a gzipped tar layer from a directory's contents (recursive).
76///

Callers 3

stageMethod · 0.85
sealMethod · 0.85

Calls

no outgoing calls