My understanding is that it can't just be recompiled as an ape, it has to be rewritten as one.
I ported a C codebase (routino) to an redbean APE, it was a little bit of work but not alot. If fossil does not use many external dependencies it'd probably not be that much work, especially considering sqlite is already there.