$30 off During Our Annual Pro Sale. View Details »

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. Using Rust with ILDA (Laser Video) Files Lukas Prasuhn 2019/07/03

    @ Rust LT #6
  2. About me - Software Engineer @ Ubie - Kotlin /

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

    level - Move - Color - Blanking (Laser On/Off)
  4. 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
  5. 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?
  6. - 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
  7. Used crate to display ILDA data with OpenGL - OpenGL

    wrapper for Rust - Window creation (through winit) - Event processing - Vertex mapping via macro glium
  8. None
  9. 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
  10. 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
  11. None
  12. 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
  13. Lets use Rust!