1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! Embed the `ClipAsm` typed Video and Audio compiler and renderer.
//!
//! `ClipAsm` separates authoring from execution. Parse a native `.clipasm`
//! [`source::SourcePackage`] through [`language`], then compile it into a pure
//! [`compiler::CompiledProgram`]. The dependency-light base library also exposes
//! virtual-asset browser preparation and recipe serialization.
//!
//! Compilation performs no media or external-tool I/O. The `native` feature is
//! the first layer allowed to inspect assets, `FFmpeg`, or `FFprobe`.
//!
//! # Cargo features
//!
//! - No features builds the language, compiler, model, reference catalog, and
//! pure browser preparation/render-recipe adapters.
//! - `native` adds filesystem/tool preflight and native rendering.
//! - The default `cli` feature includes `native` and the `clipasm` executable.
//!
//! # Example
//!
//! ```
//! use std::path::Path;
//!
//! let program = clipasm::language::parse_str(
//! Path::new("program.clipasm"),
//! "clipasm 1\nimage(\"missing.png\", 1s)\n",
//! )?;
//! let compiled = clipasm::compiler::compile(&program)?;
//! assert_eq!(compiled.value_count(), 1);
//! # Ok::<(), clipasm::diagnostic::Diagnostic>(())
//! ```
//!
//! Native execution is available when the `native` feature is enabled:
//!
//! ```no_run
//! # #[cfg(feature = "native")]
//! # fn run() -> Result<(), clipasm::diagnostic::Diagnostic> {
//! use std::path::Path;
//!
//! let program = clipasm::language::parse_file(Path::new("program.clipasm"))?;
//! let compiled = clipasm::compiler::compile(&program)?;
//! let prepared = clipasm::preflight::preflight(&compiled)?;
//! let report = clipasm::render::render(&prepared)?;
//! println!("{}", report.output().display());
//! # Ok(())
//! # }
//! ```
//!
//! The native language, programs, and stack behavior are
//! documented in the project guide rather than duplicated in this Rust API
//! reference.
pub
pub
pub
pub
pub
pub
pub
pub