SPB Git

spb/zyquo-local Public MIT

Native macOS AI chat that runs LLMs 100% locally on Apple Silicon with MLX — no cloud, no API keys.

Swift 97.2% Shell 1.8% Makefile 1%
697 B · 30 lines swift
Raw Blame History
1//2//  HardwareGate.swift3//  Zyquo Local4//5//  Author: Simon-Pierre Boucher6//  Mail: contact@spboucher.ai7//89import Foundation1011/// MLX requires Apple Silicon. The binary is arm64-only, so this gate is a12/// defensive runtime check (e.g. against a future universal build).13enum HardwareGate {14    static var isAppleSilicon: Bool {15        #if arch(arm64)16        return true17        #else18        return false19        #endif20    }2122    /// Physical unified memory in bytes (`sysctl hw.memsize`).23    static var physicalMemory: UInt64 {24        var size: UInt64 = 025        var len = MemoryLayout<UInt64>.size26        sysctlbyname("hw.memsize", &size, &len, nil, 0)27        return size28    }29}30