export functions in pre phase even in asm (it's just in funcs that we don't)
refactor jvm support into a JS library