add support for Async rewrite rules, borrowed from uTop. thanks @diml!