Support compiled templates

Took #125 by @NateLillich and merged in v0.9.0.