Yes, it’s happening
I’ve contemplated the rewrite of asciinema CLI for several years, but I didn’t have as many good reasons (and time) to justify it in the past. Python served us well for the last 12 years, however, there’s plenty of good reasons to do the Rust rewrite now.
Among other things, the rewrite will (in random order):
- minimize runtime dependencies thanks to static binary produced by Rust compiler - e.g. no more need for having Python interpreter installed on a recorded server or in a container
- allow easy integration of avt (which is written in Rust) to implement things like conversion to pure text (
asciinema convert demo.cast demo.txt), also give asciinema insight into what is actually happening in a terminal during a recording session, potentially enabling many cool features
- allow easy integration of tst (which is written in Rust) to implement terminal live streaming (
- allow easy integration of agg (which is written in Rust), potentially as
asciinema convert demo.cast demo.gif, so one doesn’t need to install a separate tool to generate a GIF
- enable code sharing (where it makes sense) between the CLI and the web player, as the player already uses Rust/WASM
- make startup faster - nice to have when automatically recording (“logging”) all shells/terminal tabs to a directory
- make me happy as I enjoy working with Rust much more than with Python these days
Current Python codebase is small (~2800 LOC) so it’s not really a big endeavour.
I started working on the rewrite in the
develop branch. This will become asciinema CLI 3.0 (I’ll post about the greater plan for 3.0 soon). The original Python implementation (2.x) stays in the
main branch for now, and will be kept in an archive branch (
python) for the foreseeable future (~forever).
So far I have the
asciinema upload and
asciinema auth commands implemented. They seem to work fine, although I tested on Linux only so far.
If you’d like to help testing it check the building instructions here: Testing the new Rust version of the asciinema CLI