sam3rs 0.4.0

Real-time Meta SAM 3 in native Rust on NVIDIA GPUs (CUDA) and Apple silicon (Metal): text, box and click segmentation and video tracking, up to 93x faster than PyTorch
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.96"
name = "sam3rs"
version = "0.4.0"
authors = ["Praveen Perera"]
build = "build.rs"
include = [
    "/src/**",
    "/kernels/**",
    "/csrc/**",
    "/examples/**",
    "/build.rs",
    "/README.md",
    "/CHANGELOG.md",
    "/LICENSE",
    "/NOTICE",
    "/Cargo.toml",
    "/tests/tokenizer_cases.json",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Real-time Meta SAM 3 in native Rust on NVIDIA GPUs (CUDA) and Apple silicon (Metal): text, box and click segmentation and video tracking, up to 93x faster than PyTorch"
documentation = "https://docs.rs/sam3rs"
readme = "README.md"
keywords = [
    "sam3",
    "segmentation",
    "cuda",
    "metal",
    "inference",
]
categories = [
    "computer-vision",
    "science",
]
license = "Apache-2.0"
repository = "https://github.com/avencera/sam3rs"

[features]
cli = [
    "dep:clap",
    "dep:color-eyre",
]
default = ["online"]
nvtx = ["dep:cc"]
online = [
    "dep:hf-fetch",
    "hf-fetch/online",
]

[lib]
name = "sam3rs"
path = "src/lib.rs"

[[bin]]
name = "sam3rs"
path = "src/main.rs"
required-features = ["cli"]

[[example]]
name = "bench"
path = "examples/bench.rs"

[[example]]
name = "bench_points"
path = "examples/bench_points.rs"

[[example]]
name = "bench_video"
path = "examples/bench_video.rs"

[dependencies.bytemuck]
version = "1"

[dependencies.clap]
version = "4"
features = ["derive"]
optional = true

[dependencies.color-eyre]
version = "0.6"
optional = true

[dependencies.eyre]
version = "0.6"

[dependencies.hf-fetch]
version = "0.1.2"
optional = true
default-features = false

[dependencies.image]
version = "0.25"
features = [
    "jpeg",
    "png",
]
default-features = false

[dependencies.memmap2]
version = "0.9.12"

[dependencies.regex]
version = "1.13"

[dependencies.safetensors]
version = "0.8.0"

[dependencies.serde_json]
version = "1"

[dev-dependencies.clap]
version = "4"
features = ["derive"]

[dev-dependencies.color-eyre]
version = "0.6"

[dev-dependencies.tempfile]
version = "3"

[build-dependencies.cc]
version = "1"
optional = true

[target.'cfg(not(target_os = "macos"))'.dependencies.cudarc]
version = "0.19.10"
features = [
    "std",
    "driver",
    "cublas",
    "cublaslt",
    "dynamic-loading",
    "cuda-13000",
]
default-features = false

[target.'cfg(not(target_os = "macos"))'.dependencies.libloading]
version = "0.9"

[target.'cfg(target_os = "macos")'.dependencies.half]
version = "2"

[target.'cfg(target_os = "macos")'.dependencies.objc2]
version = "0.6.5"

[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "0.3.2"
features = [
    "std",
    "NSString",
    "NSError",
    "NSDictionary",
    "NSProcessInfo",
    "NSArray",
    "NSData",
    "NSRange",
]
default-features = false

[target.'cfg(target_os = "macos")'.dependencies.objc2-metal]
version = "0.3.2"
features = [
    "std",
    "objc2-core-foundation",
    "MTLAllocation",
    "MTLArgument",
    "MTLBuffer",
    "MTLCommandBuffer",
    "MTLCommandEncoder",
    "MTLCommandQueue",
    "MTLComputeCommandEncoder",
    "MTLComputePass",
    "MTLComputePipeline",
    "MTLCounters",
    "MTLDataType",
    "MTLDevice",
    "MTLLibrary",
    "MTLResource",
    "MTLTypes",
]
default-features = false

[lints.clippy]
enum_glob_use = "warn"
redundant_closure_for_method_calls = "warn"
wildcard_imports = "warn"

[profile.release]
debug = "line-tables-only"