Skip to main content

sva_cli/
lib.rs

1// Concern: wires this CLI's subcommand modules atop sva-core's pipeline | Non-concern: the pipeline itself (sva-core), JS bindings (sva-wasm) | IO: none
2
3mod args;
4mod arity;
5mod bare;
6mod composition;
7mod destination;
8mod device;
9mod directory;
10mod heard;
11mod help;
12mod lint;
13mod new;
14mod output;
15mod panic;
16mod rates;
17mod recording;
18mod render;
19mod solve;
20mod store;
21mod terminal;
22mod trace;
23mod variables;
24mod wav;
25
26pub use args::{AnalyzeArgs, CacheAt, Command, Format, RenderArgs, SolveArgs, parse_args};
27pub use composition::{composition, located};
28pub use destination::{Framing, refuse_inside, write as write_destination};
29pub use help::help_text;
30
31/// The composition at `dir`, its `sample("<path>")` reads decoded off the files they name.
32pub fn heard(dir: std::path::PathBuf) -> Result<impl sva_ast::Source, CliError> {
33    heard::Heard::at(dir)
34}
35pub use lint::{BODY_CHARS, Finding, LintReport, lint, lint_bounded};
36pub use new::{FILES, NEXT, Scaffolded, scaffold};
37pub use output::{help_data, lint_data, new_data, trace_data, version_data};
38pub use panic::{Stopped, caught, stopped};
39pub use recording::{READS, read_recording};
40pub use render::{analyze, render};
41pub use solve::solve;
42pub use sva_core::{
43    Builtins, Callable, CliError, builtins, builtins_data, cwd, error_envelope, success_envelope,
44};
45pub use terminal::{colored, diagnostics_text};
46pub use trace::{Traceable, trace};
47pub use wav::{SampleEncoding, write_channels, write_wav};
48
49pub const NAME: &str = "sva-cli";
50pub const VERSION: &str = env!("CARGO_PKG_VERSION");