Is it allowed to incorporate any compiler within the themes?
It will only work in the back-end. I am asking because I know from theme requirements that most theme check errors need to be fixed and file operations are viewed as an issue.
i think if there is no security issue you can.
you need to take care of file permissions.