Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using Rust to Process ILDA (Laser Video) Files

Lukas
July 03, 2019

Using Rust to Process ILDA (Laser Video) Files

Lukas

July 03, 2019
Tweet

More Decks by Lukas

Other Decks in Technology

Transcript

  1. About me - Software Engineer @ Ubie - Kotlin /

    Spring Boot - Typescript / React - Ruby / Rails - 14y in Japan from Germany lukasjapan @cvguy84
  2. ILDA files - Video for Laser Projectors - Fairly low

    level - Move - Color - Blanking (Laser On/Off)
  3. Making command line tools for ILDA files - No satisfactory

    OSS solution - Mostly players & libraries - Windows tools that you need to download from forums - Streaming - Unix command feeling - Do one thing but do it good - Connect via pipes - … - Controlling home brew projector lukasjapan/ilda-tools
  4. Why in Rust? - Controlling a homebrew projector from Raspberry

    Pi - Statically compiled - Performance - Library ecosystem - Cargo - Crates.io - Ruling out other choices - Go → less performant - C++ → the build system is … - Kotlin Native → origin is JVM, production ready?
  5. - All purpose command line argument library - Supports -

    Flags (-v) - Short names (-x yy) - Long names (--foo=bar) - Automatic help generation Used crate for command line argument processing clap
  6. Used crate to display ILDA data with OpenGL - OpenGL

    wrapper for Rust - Window creation (through winit) - Event processing - Vertex mapping via macro glium
  7. Used crate(s) to help converting from SVG to ILDA -

    usvg - Simplify svg files - Reader: svgdom - lyon_geom - Part of a bigger project (lyon) - Svg calculation tools (bezier curves, etc) usvg, lyon_geom
  8. Used crate to create wav files - Projector takes analog

    signal - DAC - Digital Analog Converter - Sound card is a DAC - Convert ILDA files to WAV - Get properly timed analog signal from sound card - hound - read/write wav headers and content hound Sound Card .wav
  9. Cargo and crates.io - Rusts dependency manager - Files -

    Dependency definition file (cargo.toml) - Lock file (cargo.lock) - In other languages - Ruby: bundler + rubygems - JS: npm/yarn + npm packages - PHP: composer + packagist - … - Thoughts - As easy to use as in other languages - Crates are sufficiently mature - Finally this kind of solution arrived for a statically compiled language