#TIL The reason we still don't have a feature-complete free RAR implementation in libarchive, is due to The RAR Virtual Machine! I thought the reason was RARv5, but I was wrong.

To unpack some RAR files you need to execute custom RARVM bytecode embedded in the RAR files. Not a surprise that nobody in the libarchive team has the motivation to mess with it so far.

There's at least a usable LGPL partial implementation. Whoever has too much time on their hands and loves to work with cursed project can try integrating it to libarchive...

github.com/libarchive/libarchi

github.com/sumatrapdfreader/su