https://github.com/lkuper/aw but in rust