MCPcopy Create free account
hub / github.com/csskit/csskit / asset_name

Function asset_name

packages/csskit_zed/src/lib.rs:14–28  ·  view source on GitHub ↗
(platform: zed::Os, arch: zed::Architecture)

Source from the content-addressed store, hash-verified

12}
13
14fn asset_name(platform: zed::Os, arch: zed::Architecture) -> Result<String> {
15 Ok(format!(
16 "csskit-{platform}-{arch}",
17 platform = match platform {
18 zed::Os::Mac => "darwin",
19 zed::Os::Linux => "linux",
20 zed::Os::Windows => "win32",
21 },
22 arch = match arch {
23 zed::Architecture::Aarch64 => "arm64",
24 zed::Architecture::X8664 => "x64",
25 zed::Architecture::X86 => return Err("x86 (32-bit) is not supported".into()),
26 },
27 ))
28}
29
30fn needs_download(installed_version: Option<&str>, release_version: &str, binary_exists: bool) -> bool {
31 match installed_version {

Callers 2

Calls

no outgoing calls

Tested by 1