[package]
edition = "2024"
rust-version = "1.95"
name = "coremlit"
version = "0.1.2"
build = "build.rs"
exclude = [
"conversion/",
"tests/align/fixtures/",
"tests/ced/fixtures/",
"tests/clap/fixtures/",
"tests/face/fixtures/",
"tests/identity/fixtures/",
"tests/lid/fixtures/",
"tests/siglip/fixtures/",
"tests/speaker/fixtures/",
"tests/vad/fixtures/",
"tests/whisper/fixtures/",
"tests/whisper_swift_probes/",
]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Safe, synchronous CoreML runtime for macOS (CPU/GPU/Neural Engine) with opt-in on-device multimodal pipelines: speech (Whisper STT, forced alignment, speaker diarization, Silero VAD), AudioSet sound-event tagging, and audio/text/image embeddings (CLAP, granite, SigLIP)"
readme = "README.md"
keywords = [
"coreml",
"macos",
"speech",
"embeddings",
"multimodal",
]
categories = [
"multimedia::audio",
"os::macos-apis",
"artificial-intelligence",
"computer-vision",
"api-bindings",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/findit-studio/coremlit"
[package.metadata.docs.rs]
all-features = true
default-target = "aarch64-apple-darwin"
targets = ["aarch64-apple-darwin"]
[features]
align = [
"dep:asry",
"dep:humantime",
"dep:serde_json",
"dep:serde",
"dep:tokenizers",
]
align-oracle = [
"align",
"asry/alignment",
]
ced = [
"dep:rustfft",
"dep:soundevents-dataset",
"dep:windit",
]
clap = [
"dep:rustfft",
"dep:tokenizers",
"dep:windit",
"dep:serde_json",
]
commercial-face-arcface = ["face"]
default = []
face = ["dep:sha2"]
granite = [
"dep:tokenizers",
"dep:windit",
"windit/text",
"dep:sha2",
"dep:serde_json",
]
identity = ["dep:rustfft"]
lid = [
"dep:rustfft",
"dep:windit",
]
nl-recognizer = [
"whisper",
"dep:objc2-natural-language",
]
serde = [
"dep:serde",
"windit?/serde",
]
siglip = [
"dep:tokenizers",
"dep:pixon",
"dep:sha2",
"dep:serde_json",
]
speaker = ["dep:diaric"]
tracing = ["dep:tracing"]
vad = ["dep:zuoer"]
whisper = [
"dep:libc",
"dep:mach2",
"dep:rand",
"dep:serde_json",
"dep:tokenizers",
"dep:unicode_categories",
]
[lib]
name = "coremlit"
path = "src/lib.rs"
[[example]]
name = "whisper_mic_stream"
path = "examples/whisper/mic_stream.rs"
test = true
required-features = ["whisper"]
[[example]]
name = "whisper_transcribe_wav"
path = "examples/whisper/transcribe_wav.rs"
required-features = ["whisper"]
[[test]]
name = "align_align_chunk"
path = "tests/align/align_chunk.rs"
required-features = ["align"]
[[test]]
name = "align_model_io"
path = "tests/align/model_io.rs"
required-features = ["align"]
[[test]]
name = "align_parity_words"
path = "tests/align/parity_words.rs"
required-features = ["align-oracle"]
[[test]]
name = "align_registry_handle"
path = "tests/align/registry_handle.rs"
required-features = ["align"]
[[test]]
name = "ced_e2e"
path = "tests/ced/e2e.rs"
required-features = ["ced"]
[[test]]
name = "ced_model_io"
path = "tests/ced/model_io.rs"
required-features = ["ced"]
[[test]]
name = "ced_parity_logits"
path = "tests/ced/parity_logits.rs"
required-features = ["ced"]
[[test]]
name = "ced_placement"
path = "tests/ced/placement.rs"
required-features = ["ced"]
[[test]]
name = "clap_e2e"
path = "tests/clap/e2e.rs"
required-features = ["clap"]
[[test]]
name = "clap_model_io"
path = "tests/clap/model_io.rs"
required-features = ["clap"]
[[test]]
name = "clap_placement"
path = "tests/clap/placement.rs"
required-features = ["clap"]
[[test]]
name = "clap_text_model_io"
path = "tests/clap/text_model_io.rs"
required-features = ["clap"]
[[test]]
name = "clap_tokenizer_identity"
path = "tests/clap/tokenizer_identity.rs"
required-features = ["clap"]
[[test]]
name = "compile"
path = "tests/compile.rs"
[[test]]
name = "face_align_golden"
path = "tests/face/align_golden.rs"
required-features = ["face"]
[[test]]
name = "face_gate"
path = "tests/face/gate.rs"
required-features = ["face"]
[[test]]
name = "face_known_pairs"
path = "tests/face/known_pairs.rs"
required-features = ["commercial-face-arcface"]
[[test]]
name = "face_model_io"
path = "tests/face/model_io.rs"
required-features = ["commercial-face-arcface"]
[[test]]
name = "face_parity"
path = "tests/face/parity.rs"
required-features = ["commercial-face-arcface"]
[[test]]
name = "face_placement"
path = "tests/face/placement.rs"
required-features = ["commercial-face-arcface"]
[[test]]
name = "feature_map"
path = "tests/feature_map.rs"
[[test]]
name = "fp16_guards"
path = "tests/fp16_guards.rs"
[[test]]
name = "granite_driver_crosscheck"
path = "tests/granite/driver_crosscheck.rs"
required-features = ["granite"]
[[test]]
name = "granite_embed_long"
path = "tests/granite/embed_long.rs"
required-features = ["granite"]
[[test]]
name = "granite_embed_windows"
path = "tests/granite/embed_windows.rs"
required-features = ["granite"]
[[test]]
name = "granite_model_io"
path = "tests/granite/model_io.rs"
required-features = ["granite"]
[[test]]
name = "granite_parity_embed"
path = "tests/granite/parity_embed.rs"
required-features = ["granite"]
[[test]]
name = "granite_placement"
path = "tests/granite/placement.rs"
required-features = ["granite"]
[[test]]
name = "granite_tokenizer_identity"
path = "tests/granite/tokenizer_identity.rs"
required-features = ["granite"]
[[test]]
name = "identity_model_io"
path = "tests/identity/model_io.rs"
required-features = ["identity"]
[[test]]
name = "identity_parity_embed"
path = "tests/identity/parity_embed.rs"
required-features = ["identity"]
[[test]]
name = "lid_e2e"
path = "tests/lid/e2e.rs"
required-features = ["lid"]
[[test]]
name = "lid_long_clip"
path = "tests/lid/long_clip.rs"
required-features = ["lid"]
[[test]]
name = "lid_model_io"
path = "tests/lid/model_io.rs"
required-features = ["lid"]
[[test]]
name = "model_licences"
path = "tests/model_licences.rs"
[[test]]
name = "siglip_band_provenance"
path = "tests/siglip/band_provenance.rs"
required-features = ["siglip"]
[[test]]
name = "siglip_e2e"
path = "tests/siglip/e2e.rs"
required-features = ["siglip"]
[[test]]
name = "siglip_model_io"
path = "tests/siglip/model_io.rs"
required-features = ["siglip"]
[[test]]
name = "siglip_parity_embed"
path = "tests/siglip/parity_embed.rs"
required-features = ["siglip"]
[[test]]
name = "siglip_placement"
path = "tests/siglip/placement.rs"
required-features = ["siglip"]
[[test]]
name = "siglip_preprocess"
path = "tests/siglip/preprocess.rs"
required-features = ["siglip"]
[[test]]
name = "siglip_text_model_io"
path = "tests/siglip/text_model_io.rs"
required-features = ["siglip"]
[[test]]
name = "siglip_tokenizer_identity"
path = "tests/siglip/tokenizer_identity.rs"
required-features = ["siglip"]
[[test]]
name = "speaker_argmax_model_io"
path = "tests/speaker/argmax_model_io.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_golden_metadata"
path = "tests/speaker/golden_metadata.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_model_io"
path = "tests/speaker/model_io.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_parity_argmax_accuracy"
path = "tests/speaker/parity_argmax_accuracy.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_parity_argmax_swift"
path = "tests/speaker/parity_argmax_swift.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_parity_diarize_wiring"
path = "tests/speaker/parity_diarize_wiring.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_parity_embed"
path = "tests/speaker/parity_embed.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_parity_online_swift"
path = "tests/speaker/parity_online_swift.rs"
required-features = ["speaker"]
[[test]]
name = "speaker_parity_seg"
path = "tests/speaker/parity_seg.rs"
required-features = ["speaker"]
[[test]]
name = "tiny_model"
path = "tests/tiny_model.rs"
[[test]]
name = "vad_model_io"
path = "tests/vad/model_io.rs"
required-features = ["vad"]
[[test]]
name = "vad_model_state"
path = "tests/vad/model_state.rs"
required-features = ["vad"]
[[test]]
name = "vad_parity_swift"
path = "tests/vad/parity_swift.rs"
required-features = ["vad"]
[[test]]
name = "vad_reexport"
path = "tests/vad/reexport.rs"
required-features = ["vad"]
[[test]]
name = "whisper_golden_provenance"
path = "tests/whisper/golden_provenance.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_longform"
path = "tests/whisper/longform.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_model_io"
path = "tests/whisper/model_io.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_models_lock"
path = "tests/whisper/models_lock.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_parity_es"
path = "tests/whisper/parity_es.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_parity_jfk"
path = "tests/whisper/parity_jfk.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_pipeline"
path = "tests/whisper/pipeline.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_rtf_gate"
path = "benches/whisper/rtf_gate.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_streaming"
path = "tests/whisper/streaming.rs"
required-features = ["whisper"]
[[test]]
name = "whisper_vad_source"
path = "tests/whisper/vad_source.rs"
required-features = [
"whisper",
"vad",
]
[[bench]]
name = "align_align"
path = "benches/align/align.rs"
harness = false
required-features = ["align"]
[[bench]]
name = "clap_encode"
path = "benches/clap/encode.rs"
harness = false
required-features = ["clap"]
[[bench]]
name = "whisper_rtf"
path = "benches/whisper/rtf.rs"
harness = false
required-features = ["whisper"]
[[bench]]
name = "whisper_stages"
path = "benches/whisper/stages.rs"
harness = false
required-features = ["whisper"]
[dependencies.asry]
version = "0.3"
features = ["emissions"]
optional = true
default-features = false
[dependencies.block2]
version = "0.6"
[dependencies.derive_more]
version = "2.1"
features = [
"display",
"is_variant",
]
[dependencies.diaric]
version = "0.2"
optional = true
[dependencies.half]
version = "2.7"
[dependencies.humantime]
version = "2"
optional = true
[dependencies.libc]
version = "0.2"
optional = true
[dependencies.mach2]
version = "0.7"
optional = true
[dependencies.objc2]
version = "0.6"
[dependencies.objc2-core-foundation]
version = "0.3"
[dependencies.objc2-core-ml]
version = "0.3"
features = [
"block2",
"objc2-core-video",
]
[dependencies.objc2-core-video]
version = "0.3"
[dependencies.objc2-foundation]
version = "0.3"
[dependencies.objc2-natural-language]
version = "0.3"
features = [
"std",
"NLLanguage",
"NLLanguageRecognizer",
]
optional = true
default-features = false
[dependencies.pixon]
version = "0.6"
features = [
"std",
"rgb",
]
optional = true
default-features = false
[dependencies.rand]
version = "0.10"
optional = true
[dependencies.rustfft]
version = "6"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "1"
optional = true
[dependencies.sha2]
version = "0.11"
optional = true
[dependencies.soundevents-dataset]
version = "0.4"
features = [
"std",
"rated",
]
optional = true
default-features = false
[dependencies.thiserror]
version = "2"
[dependencies.tokenizers]
version = "0.23"
features = ["unstable_wasm"]
optional = true
default-features = false
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.unicode_categories]
version = "0.1"
optional = true
[dependencies.windit]
version = "0.5"
optional = true
[dependencies.zuoer]
version = "0.3"
optional = true
[dev-dependencies.asry]
version = "0.3"
features = ["emissions"]
default-features = false
[dev-dependencies.cpal]
version = "0.18"
[dev-dependencies.criterion]
version = "0.8"
features = ["cargo_bench_support"]
default-features = false
[dev-dependencies.half]
version = "2.7"
[dev-dependencies.hound]
version = "3.5"
[dev-dependencies.libc]
version = "0.2"
[dev-dependencies.mach2]
version = "0.7"
[dev-dependencies.npyz]
version = "0.9"
[dev-dependencies.png]
version = "0.18"
[dev-dependencies.postcard]
version = "1.1"
features = ["use-std"]
default-features = false
[dev-dependencies.proc-macro2]
version = "1"
features = ["span-locations"]
[dev-dependencies.rubato]
version = "5.0"
[dev-dependencies.serde]
version = "1"
features = [
"derive",
"derive",
]
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.sha2]
version = "0.11"
[dev-dependencies.syn]
version = "3"
features = ["full"]
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.tokenizers]
version = "0.23"
features = ["unstable_wasm"]
default-features = false
[dev-dependencies.toml]
version = "1"
[lints.clippy]
undocumented_unsafe_blocks = "deny"
[lints.rust]
missing_docs = "deny"
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1
[lints.rust.single_use_lifetimes]
level = "warn"
priority = -1