zruntime code (from old svn repo)