Appearance
Source layout reference
Use this reference to find the public target, test suite, or operational file that owns your change.
Public package targets
Package.swift exports 28 library products plus the mere.run and mere.run.app executables. scripts/package-policy.json is the registry of record for every target and product: it holds the role, owner, purpose, and allowed dependencies used below, and ./scripts/check.sh fails on an entry that is missing or stale. See package responsibilities before you move behavior between targets, and the repository tour for the same list in product order.
Contracts, model management, and relay
Sources/MereRunContract/: portable CLI capability and result contractsSources/MereRunModelKit/: portable model identity and storage metadataSources/MereRunEvaluation/: versioned external evaluation pack formatSources/MereRunRelayKit/: portable relay client and workflow transport
Execution, admission, and residency
Sources/MereRunExecution/: durable operation storage and terminal stateSources/MereRunAdmission/: machine inference admission and reservationsSources/MereRunResidency/: resource leases and runtime eviction
Shared computation
Sources/MereRunTensor/: tensor kernels and checkpoint loadingSources/MereRunDecode/: shared autoregressive sampling and decodingSources/MereRunKVCache/: attention cache storage and quantizationSources/MereRunTextEncoder/: shared text conditioning encoders
Model runtimes
Sources/MereRunGemmaModel/: Gemma text and vision computationSources/MereRunQwenModel/: Qwen text and vision computationSources/MereRunLagunaModel/: Laguna text computationSources/MereRunLTXModel/: LTX transformer and VAE computationSources/MereRunH3Model/: H3 transformer and VAE computationSources/MereRunImageModels/: image model computationSources/MereRunAudioModels/: shared vocoder computationSources/AudioParakeetModel/: Parakeet model computationSources/AudioQwen3ASRModel/: Qwen speech recognition computationSources/AudioQwen3TTSModel/: Qwen speech synthesis computationSources/AudioSortformer/: speaker diarization model computation
A new model runtime belongs in one of these targets, or in a new target that owns it, not in MereRunCore. Their products are published imports kept for compatibility; in-repo callers import the owning target directly.
Audio and media
Sources/AudioCore/: portable audio-domain operations and contractsSources/AudioCodecs/: audio codecs and spectral featuresSources/AudioSTT/: speech recognition orchestration and compatibility facade, overParakeet/andQwen3ASR/; diarization moved toAudioSortformerSources/AudioTTS/: speech synthesis orchestration and compatibility facade, overQwen3TTS/andTTS/Sources/MediaIO/: portable media reading and writing
Keep Linux audio/video probing fixture-sized: use ffmpeg and ffprobe stubs or tiny generated files in tests, not real model checkpoints.
MereRunCore
Public runtime orchestration and the compatibility facade over the libraries above. Some of its areas:
ACEStep/: music generationCodeGen/: code-generation supportEmbeddings/: embedding supportFlux2Klein/: Klein image familyLTX/: video generationLightOnOCR/: OCRLoRA/: LoRA supportMLX/: MLX utilitiesGemma4/,LFM2/,MeBot/,Psi/,Q35/: text model familiesQwenImageEdit/: image editingSupport/: model paths, manifests, resolver, config helpersTraining/: training-specific support retained in the packageVLM/: vision-language model supportZImageI2L/,ZImageTurbo/: image-family support
Implement Linux CLI compatibility through reusable core surfaces, not app bundle code. Keep media-tool discovery behind typed APIs, and resolve MERERUN_FFMPEG, then MERERUN_FFPROBE, and then PATH.
MereRunCLI
The public executable target behind the mere.run product: CLI parsing, transport, and presentation.
Commands/Support/
Exercise product Linux compatibility through this target.
StudioKit, StudioUI, MereRunApp
The optional Studio, in three targets under apps/macos/: StudioKit is the SwiftUI-free model layer, StudioUI holds every view, and MereRunApp is the mere.run.app executable that composes them. All three stay macOS-only and must not become Linux compatibility dependencies.
Tests
Tests/MereRunCoreTests
Use this for:
- runtime behavior
- model resolution
- subsystem-level integration
Tests/MereRunCLITests
Use this for:
- command parsing
- public CLI UX contracts
- help and command-tree expectations
Operational files
Package.swift: public package definitionscripts/check.sh: main validation gatescripts/e2e_smoke.sh: installed-model smoke runnervendor/llama.xcframework: vendored native dependency for code and API pathsvendor/mlx-swift_Cmlx.bundle: macOS MLX shader resources. Hosted Linux CI uses CPU MLX-sized fixtures, while Linux arm64 package validation requires the CUDA path on real arm64 CUDA hardware