[Media] Rust helped us massively speedup & improve our internal company tool.

242 points n3buchadnezzar 10 comments
[Media] Rust helped us massively speedup & improve our internal company tool.

https://github.com/unioslo/osp-cli-rs/tree/main

config show PyInstaller uv run osp-cli-rust
CLI 673.1 ms 695.4 ms 4.0 ms
REPL 1094.7 ms 1059.1 ms 331.5 ms

Speedup

config show Baseline PyInstaller uv run osp-cli-rust
CLI uv run 1.03x faster 1.00x 173.9x faster
REPL PyInstaller 1.00x 1.03x faster 3.30x faster

Honestly rewriting the entire application in an language i am very unfamiliar with was scary.. But the rust documentation was very good, and the tooling much better than Python. So with Copilot a free weekend and copious amounts of cofee I almost got our tool back up to the full python specs!

I also felt I had to do a lot less shortcuts and questionable things in Rust compared to the amount of ducttape and monkey patching to get the python version working. Rust felt.. Safer.

This tool is not built to be consumed by others, but just wanted to show a fun weekend project and say how awesome rust is. Even if i dreaded the rewrite ^(^)

Critisism welcome

(yes its over-engineered, but yeah company dings..)