initialize runtime from run() (asynchronously, if run is asynchronous)
allow calling callMain even if run() was not called
refactor runtime initialization