MCPcopy Index your code
hub / github.com/anomalyco/opencode / nativeTarget

Function nativeTarget

packages/desktop/scripts/utils.ts:46–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44export const RUST_TARGET = Bun.env.RUST_TARGET
45
46function nativeTarget() {
47 const { platform, arch } = process
48 if (platform === "darwin") return arch === "arm64" ? "aarch64-apple-darwin" : "x86_64-apple-darwin"
49 if (platform === "win32") return arch === "arm64" ? "aarch64-pc-windows-msvc" : "x86_64-pc-windows-msvc"
50 if (platform === "linux") return arch === "arm64" ? "aarch64-unknown-linux-gnu" : "x86_64-unknown-linux-gnu"
51 throw new Error(`Unsupported platform: ${platform}/${arch}`)
52}
53
54export function getCurrentSidecar(target = RUST_TARGET ?? nativeTarget()) {
55 const binaryConfig = SIDECAR_BINARIES.find((b) => b.rustTarget === target)

Callers 1

getCurrentSidecarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected