Skip to main content

suno_core/
lib.rs

1//! Core engine for rs-suno: library selection, sync reconciliation, and tagging.
2//!
3//! Runtime-agnostic and free of direct IO. Network access happens through the
4//! [`Http`] port, which a CLI adapter implements, so the engine stays testable
5//! in isolation.
6
7mod auth;
8mod client;
9mod clock;
10pub mod config;
11mod consts;
12mod error;
13mod executor;
14mod extras;
15mod ffmpeg;
16mod fs;
17mod graph;
18mod hash;
19mod http;
20mod lineage;
21mod manifest;
22mod model;
23mod naming;
24pub mod reconcile;
25pub mod select;
26mod tag;
27
28#[cfg(test)]
29mod testutil;
30
31#[cfg(test)]
32mod sync_chaos;
33
34pub use auth::ClerkAuth;
35pub use client::{Playlist, SunoClient};
36pub use clock::Clock;
37pub use config::{
38    AccountConfig, AudioFormat, Config, Defaults, EffectiveSettings, FlagOverrides, SourceConfig,
39};
40pub use error::{Error, Result};
41pub use executor::{ExecOptions, ExecOutcome, Failure, Ports, RunStatus, execute};
42pub use extras::{M3u8Entry, render_m3u8};
43pub use ffmpeg::{Ffmpeg, FfmpegError, WebpEncodeSettings};
44pub use fs::{FileStat, Filesystem, FsError};
45pub use graph::{AlbumArt, CacheEntry, LineageStore, Node, PlaylistState, StoredEdge};
46pub use hash::{art_hash, art_url_hash, content_hash, meta_hash};
47pub use http::{Http, HttpRequest, HttpResponse, Method, TransportError};
48pub use lineage::{
49    Edge, EdgeRole, EdgeType, LineageContext, Resolution, ResolveOpts, ResolveStatus, RootInfo,
50    edge_type, immediate_parent, lineage_edges, resolve_roots,
51};
52pub use manifest::{ArtifactState, Manifest, ManifestEntry};
53pub use model::{Clip, HistoryEntry};
54pub use naming::{
55    CharacterSet, DEFAULT_TEMPLATE, NamingConfig, NamingRequest, RenderedName, render_clip_name,
56    render_clip_names, sanitise_name,
57};
58pub use reconcile::{
59    Action, AlbumDesired, ArtifactKind, Desired, DesiredArtifact, LocalFile, Plan, PlaylistDesired,
60    SourceMode, SourceStatus, album_desired, deletion_allowed, plan_album_artifacts,
61    plan_playlist_artifacts, reconcile,
62};
63pub use tag::{TrackMetadata, tag_flac, tag_mp3};