Skip to main content

rlx_cli/
lib.rs

1// RLX — versatile ML compiler + runtime.
2// Copyright (C) 2026 Eugene Hauptmann, Nataliya Kosmyna.
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, version 3.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16//! Shared pieces for per-model `rlx-<family>` binaries and the optional
17//! `rlx-run` multiplexer.
18
19pub mod args;
20pub mod auto_dispatch;
21pub mod chat;
22pub mod compat;
23pub mod device;
24pub mod format;
25pub mod inspect;
26pub mod lm_args;
27pub mod lm_runner;
28pub mod loader;
29pub mod mtmd;
30pub mod registry;
31pub mod weights_resolve;
32
33pub use args::req;
34pub use auto_dispatch::{
35    SniffedFrom, SniffedRunner, UnimplementedArch, arch_runner_name, auto_dispatch,
36    auto_runner_name, auto_sniff, known_unimplemented_arch, known_unimplemented_keys,
37    model_type_runner_name, run_auto,
38};
39pub use chat::{ChatMessage, ChatTemplate, ChatTemplateSource, auto_chat_template};
40pub use compat::{
41    CompatSource, CompatibilityReport, CompatibilityStatus, GgufRequiredFields, check_hf_repo,
42    check_path, looks_like_hf_repo, run_check,
43};
44pub use device::{
45    parse_device, parse_gemma_device, parse_llada2_device, parse_llama32_device,
46    parse_qwen35_device, parse_sam_device, parse_standard_device,
47};
48pub use format::WeightFormat;
49pub use inspect::{estimate_qwen35_footprint, fmt_bytes, list_mtp_keys, run_inspect};
50pub use lm_args::LmCliArgs;
51pub use lm_runner::LmRunner;
52pub use loader::{
53    GgufDirGuide, GgufTensorNameResolver, LoadOpts, RegisteredFormat, ResolveOpts,
54    WeightFormatRegistration, debug_resolve_name, gguf_dir_guide, list_registered_formats,
55    load_weight_map_resolved, load_weights_resolved, open_gguf_loader, open_loader,
56    open_loader_resolved, open_loader_resolved_with_options, open_loader_with_format, open_map,
57    open_map_with, open_weight_map_resolved, open_weights, open_weights_resolved, open_with,
58    register_gguf_tensor_resolver, register_weight_format, weights,
59};
60pub use mtmd::{AssembledTurn, MediaSource, MtmdContext, MtmdTurn};
61pub use registry::{
62    ModelRunner, dispatch, dispatch_help, register_cli, register_runner, registered_runners,
63    run_registered,
64};
65pub use rlx_core::{STANDARD_DEVICE_NAMES, validate_sam_device, validate_standard_device};
66pub use weights_resolve::{WeightsResolveCli, resolve_weights_cli};