A high-performance inference engine for AI models
[envs]
MACOSX_DEPLOYMENT_TARGET = "26.4"
IPHONEOS_DEPLOYMENT_TARGET = "26.4"
XROS_DEPLOYMENT_TARGET = "26.4"
TVOS_DEPLOYMENT_TARGET = "26.4"
WATCHOS_DEPLOYMENT_TARGET = "26.4"
[tools]
# Please make sure to use compatible versions of the cargo-swift / uniffi pair.
# See: https://github.com/antoniusnaumann/cargo-swift?tab=readme-ov-file#installing-for-a-different-uniffi-version
swift = { provider = "cargo", version = "0.11.1" }
maturin = { provider = "uv", version = "1.15.0" }
[targets."aarch64-apple-darwin"]
features = ["metal"]
aliases = ["apple", "macos"]
required_envs = ["MACOSX_DEPLOYMENT_TARGET"]
[targets."x86_64-apple-darwin"]
features = ["cpu"]
aliases = ["apple", "macos-intel"]
required_envs = ["MACOSX_DEPLOYMENT_TARGET"]
[targets."aarch64-apple-ios"]
features = ["metal"]
aliases = ["apple", "ios"]
required_envs = ["IPHONEOS_DEPLOYMENT_TARGET"]
[targets."aarch64-apple-ios-sim"]
features = ["metal"]
aliases = ["apple", "ios-sim", "ios-simulator"]
required_envs = ["IPHONEOS_DEPLOYMENT_TARGET"]
[targets."aarch64-apple-ios-macabi"]
features = ["metal"]
aliases = ["apple", "maccatalyst"]
required_envs = ["IPHONEOS_DEPLOYMENT_TARGET"]
[targets."aarch64-unknown-linux-gnu"]
features = ["cpu"]
aliases = ["linux"]
[targets."x86_64-unknown-linux-gnu"]
features = ["cpu"]
aliases = ["linux"]
[targets."aarch64-pc-windows-msvc"]
features = ["cpu"]
aliases = ["windows"]
[targets."x86_64-pc-windows-msvc"]
features = ["cpu"]
aliases = ["windows"]
[targets."wasm32-unknown-unknown"]
features = ["webgpu"]
aliases = ["wasm"]
[languages.rust]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-ios-sim",
"aarch64-apple-ios-macabi",
]
tools = []
bindings = []
examples_path = "crates/legacy/uzu/examples"
metadata = { image_url = "https://artifacts.trymirai.com/social/github/uzu-header.jpg", badges = [
"discord",
"email",
"docs",
"license",
"build",
"python",
"python_package",
"python_version",
"typescript",
"typescript_package",
"typescript_downloads",
"swift",
"swift_spm",
"swift_platforms",
"swift_version",
] }
[languages.python]
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
tools = ["maturin"]
bindings = ["pyo3"]
examples_path = "crates/legacy/uzu/bindings/python/examples"
metadata = { image_url = "https://artifacts.trymirai.com/social/github/uzu-python.jpg", badges = [
"discord",
"email",
"docs",
"license",
"build",
"python",
"python_package",
"python_version",
] }
[languages.swift]
targets = [
"aarch64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-ios-sim",
"aarch64-apple-ios-macabi",
]
tools = ["swift"]
bindings = ["uniffi"]
examples_path = "crates/legacy/uzu/bindings/swift/Sources/Examples"
metadata = { image_url = "https://artifacts.trymirai.com/social/github/uzu-swift-header.jpg", badges = [
"discord",
"email",
"docs",
"license",
"build",
"swift",
"swift_spm",
"swift_platforms",
"swift_version",
] }
[languages.typescript]
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
tools = []
bindings = ["napi"]
examples_path = "crates/legacy/uzu/bindings/typescript/examples"
metadata = { image_url = "https://artifacts.trymirai.com/social/github/uzu-typescript.jpg", badges = [
"discord",
"email",
"docs",
"license",
"build",
"typescript",
"typescript_package",
"typescript_downloads",
] }
[languages.wasm]
targets = ["wasm32-unknown-unknown"]
tools = []
bindings = ["wasm"]
[binaries.mirai]
crate = "cli"
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
[badges]
discord = '<a href="https://discord.com/invite/trymirai"><img src="https://img.shields.io/discord/1377764166764462120?label=Discord&color=brightgreen" alt="Discord"></a>'
email = '<a href="mailto:[email protected]?subject=Interested%20in%20Mirai"><img src="https://img.shields.io/badge/Send-Email-brightgreen" alt="Contact us"></a>'
docs = '<a href="https://docs.trymirai.com"><img src="https://img.shields.io/badge/Read-Docs-brightgreen" alt="Read docs"></a>'
license = '[](LICENSE)'
build = '[](https://github.com/trymirai/uzu/actions)'
python = '[](crates/legacy/uzu/bindings/python)'
python_package = '[](https://pypi.org/project/uzu/)'
python_version = '[](https://pypi.org/project/uzu/)'
typescript = '[](crates/legacy/uzu/bindings/typescript)'
typescript_package = '[](https://www.npmjs.com/package/@trymirai/uzu)'
typescript_downloads = '[](https://www.npmjs.com/package/@trymirai/uzu)'
swift = '[](crates/legacy/uzu/bindings/swift)'
swift_platforms = '[](Package.swift)'
swift_spm = '[](Package.swift)'
swift_version = '[](https://swift.org)'
[examples]
quick-start = { title = "Quick Start", description = "Minimal snippet that downloads a model and generates a single reply" }
chat = { title = "Chat", description = "In this example, we will download a model and get a reply to a specific list of messages:", explanation = "Once loaded, the same `ChatSession` can be reused for multiple requests until you drop it. Each model may consume a significant amount of RAM, so it's important to keep only one session loaded at a time. For iOS apps, we recommend adding the [Increased Memory Capability](https://developer.apple.com/documentation/bundleresources/entitlements/com.apple.developer.kernel.increased-memory-limit) entitlement to ensure your app can allocate the required memory." }
chat-cloud = { title = "Chat with the cloud model", description = "In this example, we will get a reply to a specific list of messages from a cloud model:" }
chat-shared-instance = { title = "Chat with shared instance", description = "This example shows how to reuse chat instance without reloading model into memory:" }
chat-structured-output = { title = "Chat with structured output", description = "Sometimes you want the generated output to be valid JSON with predefined fields. You can use `Grammar` to manually specify a JSON schema for the response you want to receive:" }
tool-calls = { title = "Tool calls", description = "This example shows how to use external tools:" }