Skip to content

Rust API and crate map

Ferrex’s Rust workspace is split into reusable model/core crates, the HTTP server, configuration tooling, and extracted desktop-player domain crates. Use this map when deciding where a public type should live, where rustdoc should point reviewers, and which crate owns a boundary.

Run local API documentation from the repository root:

Terminal window
cargo doc --workspace --no-deps --all-features

The generated entry point is target/doc/ferrex_core/index.html and the crate list in the rustdoc sidebar should match the workspace members listed below. Canonical docs.rs links are included for packages that are published or will be published under the current package names.

CrateManifestResponsibilityKey public surfacesRustdoc
ferrex-modelcrates/ferrex-model/Cargo.tomlDependency-light data models shared by server, player, FlatBuffers, and tooling.Media, Library, typed ids, details, image DTOs, scan events, watch-state DTOs, prelude.docs.rs
ferrex-contractscrates/ferrex-contracts/Cargo.tomlTrait layer over ferrex-model values and rkyv archives.MediaIDLike, MediaOps, MediaLike, Playable, Browsable, prelude.docs.rs
ferrex-corecrates/ferrex-core/Cargo.tomlReusable domain, API DTOs, query layer, database ports, and application facades.api, domain, query, database, player_prelude, types, traits.docs.rs
ferrex-flatbufferscrates/ferrex-flatbuffers/Cargo.tomlRust side of the mobile FlatBuffers contract.fb generated namespace, conversions, uuid_helpers, FLATBUFFERS_MIME.docs.rs
ferrexctlcrates/ferrexctl/Cargo.tomlShared config bootstrapper and CLI library used by tooling and server startup.ConfigLoader, config model re-exports, validation warnings, packaging config, runner helpers.docs.rs
ferrex-servercrates/ferrex-server/Cargo.tomlAxum HTTP server composition around core domain crates.application, handlers, infra, routes, database URL guards, demo coordinator.docs.rs

The desktop player has been split so reusable domains do not depend on the final UI shell. See docs/player-dependency-boundaries.md for the dependency policy.

CrateManifestResponsibilityKey public surfacesRustdoc
ferrex-player-foundationcrates/ferrex-player-foundation/Cargo.tomlDependency-light primitives at the bottom of the player stack.Auth policy DTOs, DomainTask, repository errors, unit helpers.docs.rs
ferrex-player-apicrates/ferrex-player-api/Cargo.tomlHTTP client, service traits, API adapters, and player-facing DTO exports.ApiClient, ApiClientAdapter, api_types, AuthService-adjacent API DTOs, service traits.docs.rs
ferrex-player-authcrates/ferrex-player-auth/Cargo.tomlAuthentication state, local encrypted storage, device identity, PIN policy, and auth service adapter.AuthDomainState, AuthService, AuthManager, auth DTO/error re-exports.docs.rs
ferrex-player-repositorycrates/ferrex-player-repository/Cargo.tomlPlayer media repository, disk cache, yoke-backed archived snapshots, and typed repository accessors.Accessor, MediaRepo, cache types, MaybeYoked, yoke aliases.docs.rs
ferrex-player-librarycrates/ferrex-player-library/Cargo.tomlLibrary domain state, scan/media subscriptions, library forms, and repository compatibility exports.LibraryDomainState, LibraryDomain, LibrariesLoadState, scan tracking helpers.docs.rs
ferrex-player-mediacrates/ferrex-player-media/Cargo.tomlCurrent media selection, season details, cached watch state, and progress helpers.MediaDomainState, MediaDomain, watch-progress selectors and messages.docs.rs
ferrex-player-metadatacrates/ferrex-player-metadata/Cargo.tomlNon-UI metadata constants and future shared metadata contracts.Image retry and cache-budget constants.docs.rs
ferrex-player-playbackcrates/ferrex-player-playback/Cargo.tomlPlayback state machine, video backend wiring, controls, track selection, and diagnostics.PlayerDomainState, PlayerDomain, PlayerMessage, redact_playback_url.docs.rs
ferrex-player-searchcrates/ferrex-player-search/Cargo.tomlSearch state, service strategy selection, calibration, metrics, and 10-foot keyboard model.SearchDomain, SearchState, SearchService, keyboard types, search events.docs.rs
ferrex-player-settingscrates/ferrex-player-settings/Cargo.tomlSettings state, section messages, view-model DTOs, and UI-agnostic reducers.SettingsDomainState, SettingsSection, color/scale re-exports.docs.rs
ferrex-player-user-admincrates/ferrex-player-user-admin/Cargo.tomlAdmin user-management state, messages, and reducers.UserManagementDomainState, UserManagementMessage, update effects.docs.rs
ferrex-player-uicrates/ferrex-player-ui/Cargo.tomlIced UI surfaces, widgets, shader assets, themes, and 10-foot views.common, domains, infra, state, view.docs.rs
ferrex-player-appcrates/ferrex-player-app/Cargo.tomlRuntime application shell that assembles UI/domain/API crates.AppConfig, run, State, compatibility shell modules.docs.rs
ferrex-playercrates/ferrex-player/Cargo.tomlInstalled desktop-player package and compatibility facade.Re-exports ferrex-player-app for historical ferrex_player::* imports.docs.rs
  • Workspace rustdoc now warns on missing crate-level docs; each public crate should explain its responsibility at the crate root.
  • Broad missing_docs = "allow" entries remain only where pre-alpha crates expose transitional state fields or generated code. Each remaining allow should carry a comment explaining why full enforcement is not yet feasible.
  • ferrex-flatbuffers keeps a crate-level missing-docs allow because most public tables are generated from .fbs schemas. Hand-written conversion and helper modules should be documented.
  • ferrex-contracts uses the workspace missing-docs warning instead of a crate-level suppression, because its public trait surface is small enough to document directly.