spb/zyquo-mlx Public MIT
The local MLX foundry for your Mac — run, fine-tune, quantize, and ship models. Nothing leaves your machine.
Swift 93.4%
Python 3.8%
Makefile 2.2%
Shell 0.5%
1//2// HardwareGate.swift3// Zyquo MLX4//5// Author: Simon-Pierre Boucher6// Mail: contact@spboucher.ai7//89import Foundation10import SwiftUI1112/// MLX requires Apple Silicon. The binary itself is arm64-only, so on an13/// Intel Mac it will not load at all — this runtime check is defense in depth14/// (e.g. exotic translation environments) and drives the polite15/// unsupported-hardware screen required by the project charter.16enum HardwareGate {1718 /// True when running natively on Apple Silicon.19 static let isAppleSilicon: Bool = {20 var value: Int32 = 021 var size = MemoryLayout<Int32>.size22 // hw.optional.arm64 is 1 on Apple Silicon, absent/0 elsewhere.23 let result = sysctlbyname("hw.optional.arm64", &value, &size, nil, 0)24 return result == 0 && value == 125 }()26}2728/// Polite, clear unsupported-hardware screen (charter requirement).29struct UnsupportedHardwareView: View {30 var body: some View {31 VStack(spacing: 16) {32 Image(systemName: "cpu")33 .font(.system(size: 48, weight: .light))34 .foregroundStyle(.secondary)35 Text("Apple Silicon Required")36 .font(.title2.weight(.semibold))37 Text("Zyquo MLX is built on MLX, Apple's machine-learning framework, which runs exclusively on Apple Silicon (M-series) Macs. This Mac does not support it.")38 .multilineTextAlignment(.center)39 .foregroundStyle(.secondary)40 .frame(maxWidth: 420)41 }42 .padding(48)43 .frame(minWidth: 560, minHeight: 360)44 }45}46