Commands

Enum Commands 

Source
pub(crate) enum Commands {
    Info {
        preset: PathBuf,
    },
    Validate {
        preset: PathBuf,
        strict: bool,
        output: Option<PathBuf>,
    },
    Render {
        preset: PathBuf,
        frames: u32,
        output: PathBuf,
        width: u32,
        height: u32,
        mesh_size: (u32, u32),
    },
    List {
        directory: PathBuf,
    },
    CompileShaders {
        directory: PathBuf,
        output: Option<PathBuf>,
    },
    ListAudio,
    Benchmark {
        preset: PathBuf,
        frames: u32,
        width: u32,
        height: u32,
        mesh_size: (u32, u32),
    },
    DumpShader {
        preset: PathBuf,
        kind: DumpKind,
    },
}

Variants§

§

Info

Show information about a preset

Fields

§preset: PathBuf

Path to the .milk preset file

§

Validate

Validate a preset file (or, with --strict, a directory of presets).

Fields

§preset: PathBuf

Path to a .milk preset OR a directory containing .milk files. A directory is only accepted in --strict mode.

§strict: bool

Run the full pipeline (parse + eval + warp HLSL→WGSL + comp HLSL→WGSL→naga-validate) and classify every failure by stage / kind. Emits a CSV alongside the input when run on a directory.

§output: Option<PathBuf>

CSV output path. Only used in --strict mode against a directory; defaults to <dir>.validate_strict.csv next to the input.

§

Render

Render a preset to images

Fields

§preset: PathBuf

Path to the .milk preset file

§frames: u32

Number of frames to render

§output: PathBuf

Output directory for frames

§width: u32

Width of output

§height: u32

Height of output

§mesh_size: (u32, u32)

Warp mesh size. Accepts a preset name (low, medium, high, ultra) or an explicit COLSxROWS (e.g. 64x48). Defaults to medium (48×36). MD2 caps at 192×96.

§

List

List all presets in a directory

Fields

§directory: PathBuf

Directory containing .milk files

§

CompileShaders

Try to compile every preset’s comp shader through the user-shader pipeline (HLSL translate → WGSL wrap → naga validate). Reports success/fail counts and writes a CSV next to the directory.

Fields

§directory: PathBuf

Directory containing .milk files

§output: Option<PathBuf>

Output CSV path (default: alongside the input dir).

§

ListAudio

List capture sources the active cpal host can see, with monitor / microphone / other classification. The autodetect pick (the monitor of the host’s default output sink, when present) is flagged with an arrow — that’s what AudioInput::with_device(None) opens at boot.

If no monitor source shows up on a PipeWire system, load module-loopback (pactl load-module module-loopback latency_msec=1) so the sink monitor is exposed to ALSA / cpal — some distros ship a minimal PipeWire config that doesn’t enable it by default.

§

Benchmark

Render N frames through the full engine and report per-frame timing statistics (mean, std-dev, min, max, p50, p99). Output is on stdout — no PNGs are written, the engine runs purely for timing.

Fields

§preset: PathBuf

Path to the .milk preset file

§frames: u32

Number of frames to render. Default 1000 (roughly 16 s at 60 fps), which is enough to amortise compile / first-frame upload costs and still complete in seconds on a workstation.

§width: u32

Render-target width.

§height: u32

Render-target height.

§mesh_size: (u32, u32)

Warp mesh size (see render’s --mesh-size).

§

DumpShader

Emit the translated WGSL for a preset’s warp and/or comp shader on stdout. Useful for debugging HLSL→WGSL translator output without standing up the renderer.

Fields

§preset: PathBuf

Path to the .milk preset file

§kind: DumpKind

Which shader(s) to dump. both (default) prints warp then comp; warp or comp print only one.

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,