Add pre_runtime_compile and post_runtime_compile