mestolo 1.0.0

A command that looks inside brodo's files: what a cache file, an archive or a .vdb holds, a slice of a grid as PNG, and grids converted to .vdb or .vtu
Documentation
  • Coverage
  • 100%
    77 out of 77 items documented1 out of 11 items with examples
  • Size
  • Source code size: 61.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 530.0 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • akahmys/brodo
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • akahmys

mestolo

A command that looks inside brodo's files, for someone who receives a cache file, an archive or a .vdb and writes no Rust. It needs no GPU and no window. ARCHITECTURE.md §6.3 says what each command gives.

cargo install mestolo

mestolo info grids.cache                                   # what the file holds
mestolo slice grids.cache --grid sdf --axis z --at 0 -o z0.png
mestolo convert grids.cache -o grids.vdb                   # for Blender, Houdini
mestolo convert grids.cache --grid sdf -o sdf.vtu          # for ParaView
mestolo convert grids.vdb --as archive -o grids.archive     # brodo's compressed archive
  • A file's kind is told by its first bytes, not its name, and it is read whole within --limit bytes, 4 GiB unless given, which bounds the file and what reading and thawing its leaves and tiles make; its nodes make about twice the bytes they take in the file.
  • Every string the file holds is written quoted and escaped, so that none can move your terminal.
  • --grid names the grid where a file holds more than one.
  • A file already at the output's path is refused unless --force is given.
  • convert writes the format --as names, vdb, vtu, cache or archive, or else the one the output's name ends in, .vdb or .vtu.
  • A command line refused, none given among them, exits with status 2, a command failing with 1.

As a library

The program is a thin user of the library, which runs a command line into any writer. Its promises are run, USAGE, args and error, as semantic versioning holds them; the command's other parts are public for its tests alone, hidden from its documentation, and promise nothing:

use mestolo::args::{Command, parse};

let command = parse(["help"].map(std::ffi::OsString::from)).unwrap();
assert_eq!(command, Command::Help);
let mut out = Vec::new();
mestolo::run(&command, &mut out).unwrap();
assert!(out.starts_with(b"usage: mestolo"));