From de459fa5bd6026cc0d93fe9e2732db81cc1366c8 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 10 Jan 2019 21:37:59 -0800 Subject: [PATCH 1/3] Isolated emscripten in new lib --- Cargo.lock | 14 + Cargo.toml | 7 +- build/mod.rs | 19 - build/spectests.rs | 709 ------------------ lib/clif-backend/Cargo.toml | 8 +- lib/emscripten/Cargo.toml | 25 + {build => lib/emscripten/build}/emtests.rs | 2 +- lib/emscripten/build/mod.rs | 11 + .../emscripten/emtests}/FS_exports.cpp | 0 .../emscripten/emtests}/FS_exports.txt | 0 .../emscripten/emtests}/FS_exports.wasm | Bin .../emscripten/emtests}/FS_exports_2.txt | 0 .../emscripten/emtests}/FS_exports_assert.txt | 0 .../emtests}/FS_exports_assert_2.txt | 0 {emtests => lib/emscripten/emtests}/README.md | 0 .../emscripten/emtests}/clock_gettime.c | 0 .../emscripten/emtests}/clock_gettime.out | 0 .../emscripten/emtests}/clock_gettime.wasm | Bin .../emscripten/emtests}/closebitcasts.c | 0 .../emscripten/emtests}/closebitcasts.txt | 0 .../emscripten/emtests}/closebitcasts.wasm | Bin {emtests => lib/emscripten/emtests}/dyncall.c | 0 .../emscripten/emtests}/dyncall.txt | 0 .../emscripten/emtests}/dyncall.wasm | Bin .../emscripten/emtests}/dyncall_specific.c | 0 .../emscripten/emtests}/dyncall_specific.txt | 0 .../emscripten/emtests}/dyncall_specific.wasm | Bin .../emscripten_get_compiler_setting.c | 0 .../emscripten_get_compiler_setting.out | 0 .../emscripten_get_compiler_setting.wasm | Bin {emtests => lib/emscripten/emtests}/env.c | 0 {emtests => lib/emscripten/emtests}/env.out | 0 {emtests => lib/emscripten/emtests}/env.wasm | Bin {emtests => lib/emscripten/emtests}/fnmatch.c | 0 .../emscripten/emtests}/fnmatch.out | 0 .../emscripten/emtests}/getValue_setValue.cpp | 0 .../emscripten/emtests}/getValue_setValue.txt | 0 .../emtests}/getValue_setValue.wasm | Bin .../emtests}/getValue_setValue_assert.txt | 0 .../emscripten/emtests}/ignores.txt | 0 .../legacy_exported_runtime_numbers.cpp | 0 .../legacy_exported_runtime_numbers.txt | 0 .../legacy_exported_runtime_numbers.wasm | Bin ...legacy_exported_runtime_numbers_assert.txt | 0 .../emscripten/emtests}/localtime.c | 0 .../emscripten/emtests}/localtime.out | 0 .../emscripten/emtests}/localtime.wasm | Bin .../emtests}/modularize_closure_pre.c | 0 .../emtests}/modularize_closure_pre.out | 0 .../emtests}/modularize_closure_pre.wasm | Bin {emtests => lib/emscripten/emtests}/printf.c | 0 .../emscripten/emtests}/printf.out | 0 .../emscripten/emtests}/printf.wasm | Bin {emtests => lib/emscripten/emtests}/puts.c | 0 {emtests => lib/emscripten/emtests}/puts.out | 0 {emtests => lib/emscripten/emtests}/puts.wasm | Bin .../emscripten/emtests}/stackAlloc.cpp | 0 .../emscripten/emtests}/stackAlloc.txt | 0 .../emscripten/emtests}/stackAlloc.wasm | Bin .../emscripten/emtests}/stack_overflow.cpp | 0 .../emscripten/emtests}/stack_overflow.wasm | Bin .../emtests}/test_addr_of_stacked.c | 0 .../emtests}/test_addr_of_stacked.out | 0 .../emtests}/test_addr_of_stacked.wasm | Bin .../emscripten/emtests}/test_alloca.c | 0 .../emscripten/emtests}/test_alloca.out | 0 .../emscripten/emtests}/test_alloca.wasm | Bin .../emscripten/emtests}/test_alloca_stack.c | 0 .../emscripten/emtests}/test_alloca_stack.out | 0 .../emtests}/test_alloca_stack.wasm | Bin .../emscripten/emtests}/test_array2.c | 0 .../emscripten/emtests}/test_array2.out | 0 .../emscripten/emtests}/test_array2.wasm | Bin .../emscripten/emtests}/test_array2b.c | 0 .../emscripten/emtests}/test_array2b.out | 0 .../emscripten/emtests}/test_array2b.wasm | Bin .../emscripten/emtests}/test_assert.c | 0 .../emscripten/emtests}/test_assert.out | 0 .../emscripten/emtests}/test_atexit.c | 0 .../emscripten/emtests}/test_atexit.out | 0 .../emscripten/emtests}/test_atoX.c | 0 .../emscripten/emtests}/test_atoX.out | 0 .../emscripten/emtests}/test_atoX.wasm | Bin .../emscripten/emtests}/test_atomic.c | 0 .../emscripten/emtests}/test_atomic.out | 0 .../emscripten/emtests}/test_atomic.wasm | Bin .../emscripten/emtests}/test_atomic_cxx.cpp | 0 .../emscripten/emtests}/test_atomic_cxx.txt | 0 .../emscripten/emtests}/test_atomic_cxx.wasm | Bin .../emscripten/emtests}/test_bigarray.c | 0 .../emscripten/emtests}/test_bigarray.out | 0 .../emscripten/emtests}/test_bitfields.c | 0 .../emscripten/emtests}/test_bitfields.out | 0 .../emscripten/emtests}/test_bsearch.c | 0 .../emscripten/emtests}/test_bsearch.out | 0 .../emscripten/emtests}/test_bsearch.wasm | Bin .../emscripten/emtests}/test_bswap64.c | 0 .../emscripten/emtests}/test_bswap64.out | 0 .../emscripten/emtests}/test_ccall.cpp | 0 .../emscripten/emtests}/test_ccall.out | 0 .../emscripten/emtests}/test_ccall.wasm | Bin .../emscripten/emtests}/test_class.c | 0 .../emscripten/emtests}/test_class.out | 0 .../emscripten/emtests}/test_complex.c | 0 .../emscripten/emtests}/test_complex.out | 0 .../emscripten/emtests}/test_complex.wasm | Bin .../emtests}/test_constglobalstructs.c | 0 .../emtests}/test_constglobalstructs.out | 0 .../emscripten/emtests}/test_conststructs.c | 0 .../emscripten/emtests}/test_conststructs.out | 0 .../emscripten/emtests}/test_copyop.c | 0 .../emscripten/emtests}/test_copyop.out | 0 .../emscripten/emtests}/test_cxx03_do_run.c | 0 .../emscripten/emtests}/test_cxx03_do_run.out | 0 .../emtests}/test_demangle_stacks.cpp | 0 .../emtests}/test_demangle_stacks.out | 0 .../emtests}/test_demangle_stacks.wasm | Bin .../test_demangle_stacks_noassert.cpp | 0 .../test_demangle_stacks_noassert.out | 0 .../test_demangle_stacks_noassert.wasm | Bin .../test_direct_string_constant_usage.c | 0 .../test_direct_string_constant_usage.out | 0 .../emscripten/emtests}/test_dlfcn_self.c | 0 .../emscripten/emtests}/test_dlfcn_self.out | 0 .../emtests}/test_dlmalloc_partial_2.c | 0 .../emtests}/test_dlmalloc_partial_2.out | 0 .../emtests}/test_dlmalloc_partial_2.wasm | Bin .../emtests}/test_double_i64_conversion.c | 0 .../emtests}/test_double_i64_conversion.out | 0 .../emscripten/emtests}/test_double_varargs.c | 0 .../emtests}/test_double_varargs.out | 0 .../emtests}/test_double_varargs.wasm | Bin .../emscripten/emtests}/test_dynamic_cast.c | 0 .../emscripten/emtests}/test_dynamic_cast.out | 0 .../emscripten/emtests}/test_dynamic_cast_2.c | 0 .../emtests}/test_dynamic_cast_2.out | 0 .../emscripten/emtests}/test_dynamic_cast_b.c | 0 .../emtests}/test_dynamic_cast_b.out | 0 .../emscripten/emtests}/test_em_asm.cpp | 0 .../emscripten/emtests}/test_em_asm.out | 0 .../emscripten/emtests}/test_em_asm.wasm | Bin .../emscripten/emtests}/test_em_asm_2.cpp | 0 .../emscripten/emtests}/test_em_asm_2.out | 0 .../emscripten/emtests}/test_em_asm_2.wasm | Bin .../emtests}/test_em_asm_parameter_pack.cpp | 0 .../emtests}/test_em_asm_parameter_pack.out | 0 .../emtests}/test_em_asm_parameter_pack.wasm | Bin .../emtests}/test_em_asm_signatures.cpp | 0 .../emtests}/test_em_asm_signatures.out | 0 .../emtests}/test_em_asm_signatures.wasm | Bin .../emtests}/test_em_asm_unicode.cpp | 0 .../emtests}/test_em_asm_unicode.out | 0 .../emtests}/test_em_asm_unicode.wasm | Bin .../emtests}/test_em_asm_unused_arguments.cpp | 0 .../emtests}/test_em_asm_unused_arguments.out | 0 .../test_em_asm_unused_arguments.wasm | Bin .../emscripten/emtests}/test_em_js.cpp | 0 .../emscripten/emtests}/test_em_js.out | 0 .../emscripten/emtests}/test_em_js.wasm | Bin .../emscripten/emtests}/test_embind_5.cpp | 0 .../emscripten/emtests}/test_embind_5.out | 0 .../emscripten/emtests}/test_emmalloc.cpp | 0 .../emscripten/emtests}/test_emmalloc.txt | 0 .../emscripten/emtests}/test_emptyclass.c | 0 .../emscripten/emtests}/test_emptyclass.out | 0 .../emtests}/test_emscripten_api.cpp | 0 .../emtests}/test_emscripten_api.out | 0 .../emtests}/test_emscripten_api.wasm | Bin .../test_emulate_function_pointer_casts.cpp | 0 .../test_emulate_function_pointer_casts.wasm | Bin .../emscripten/emtests}/test_erf.c | 0 .../emscripten/emtests}/test_erf.out | 0 .../emscripten/emtests}/test_erf.wasm | Bin .../emscripten/emtests}/test_errar.c | 0 .../emscripten/emtests}/test_errar.out | 0 .../emscripten/emtests}/test_errar.wasm | Bin .../emscripten/emtests}/test_exceptions_2.cpp | 0 .../emscripten/emtests}/test_exceptions_2.out | 0 .../emtests}/test_exceptions_2.wasm | Bin .../emtests}/test_exceptions_alias.c | 0 .../emtests}/test_exceptions_alias.out | 0 .../emtests}/test_exceptions_convert.cpp | 0 .../emtests}/test_exceptions_convert.txt | 0 .../emtests}/test_exceptions_convert.wasm | Bin .../test_exceptions_destroy_virtual.cpp | 0 .../test_exceptions_destroy_virtual.txt | 0 .../test_exceptions_destroy_virtual.wasm | Bin .../emtests}/test_exceptions_libcxx.cpp | 0 .../emtests}/test_exceptions_libcxx.txt | 0 .../emtests}/test_exceptions_libcxx.wasm | Bin .../emtests}/test_exceptions_multi.cpp | 0 .../emtests}/test_exceptions_multi.out | 0 .../emtests}/test_exceptions_multi.wasm | Bin .../test_exceptions_multiple_inherit.cpp | 0 .../test_exceptions_multiple_inherit.txt | 0 .../test_exceptions_multiple_inherit.wasm | Bin ...st_exceptions_multiple_inherit_rethrow.cpp | 0 ...st_exceptions_multiple_inherit_rethrow.txt | 0 ...t_exceptions_multiple_inherit_rethrow.wasm | Bin .../emtests}/test_exceptions_primary.cpp | 0 .../emtests}/test_exceptions_primary.txt | 0 .../emtests}/test_exceptions_primary.wasm | Bin .../emtests}/test_exceptions_refcount.cpp | 0 .../emtests}/test_exceptions_refcount.txt | 0 .../emtests}/test_exceptions_refcount.wasm | Bin .../emtests}/test_exceptions_resume.cpp | 0 .../emtests}/test_exceptions_resume.txt | 0 .../emtests}/test_exceptions_resume.wasm | Bin .../emtests}/test_exceptions_rethrow.cpp | 0 .../emtests}/test_exceptions_rethrow.txt | 0 .../emtests}/test_exceptions_rethrow.wasm | Bin .../emtests}/test_exceptions_simplify_cfg.cpp | 0 .../emtests}/test_exceptions_simplify_cfg.txt | 0 .../test_exceptions_simplify_cfg.wasm | Bin .../emtests}/test_exceptions_std.cpp | 0 .../emtests}/test_exceptions_std.out | 0 .../emtests}/test_exceptions_std.wasm | Bin .../emtests}/test_exceptions_typed.c | 0 .../emtests}/test_exceptions_typed.out | 0 .../test_exceptions_virtual_inheritance.cpp | 0 .../test_exceptions_virtual_inheritance.txt | 0 .../test_exceptions_virtual_inheritance.wasm | Bin .../emtests}/test_exceptions_white_list.cpp | 0 .../emtests}/test_exceptions_white_list.out | 0 .../emtests}/test_exceptions_white_list.wasm | Bin .../emtests}/test_exceptions_white_list_2.c | 0 .../emtests}/test_exceptions_white_list_2.out | 0 .../test_exceptions_white_list_empty.out | 0 .../emscripten/emtests}/test_fakestat.c | 0 .../emscripten/emtests}/test_fakestat.out | 0 .../emscripten/emtests}/test_fast_math.c | 0 .../emscripten/emtests}/test_fast_math.out | 0 .../emscripten/emtests}/test_fast_math.wasm | Bin .../emscripten/emtests}/test_fcvt.c | 0 .../emscripten/emtests}/test_fcvt.out | 0 .../emtests}/test_flexarray_struct.c | 0 .../emtests}/test_flexarray_struct.out | 0 .../emtests}/test_flexarray_struct.wasm | Bin .../emtests}/test_float32_precise.c | 0 .../emtests}/test_float32_precise.out | 0 .../emtests}/test_float32_precise.wasm | Bin .../emscripten/emtests}/test_float_builtins.c | 0 .../emtests}/test_float_builtins.out | 0 .../emtests}/test_float_builtins.wasm | Bin .../emscripten/emtests}/test_floatvars.c | 0 .../emscripten/emtests}/test_floatvars.out | 0 .../emscripten/emtests}/test_frexp.c | 0 .../emscripten/emtests}/test_frexp.out | 0 .../emscripten/emtests}/test_frexp.wasm | Bin .../emscripten/emtests}/test_funcptr.c | 0 .../emscripten/emtests}/test_funcptr.out | 0 .../emscripten/emtests}/test_funcptr.wasm | Bin .../emtests}/test_funcptr_import_type.cpp | 0 .../emtests}/test_funcptr_import_type.out | 0 .../emtests}/test_funcptr_namecollide.c | 0 .../emtests}/test_funcptr_namecollide.out | 0 .../emtests}/test_funcptr_namecollide.wasm | Bin .../emscripten/emtests}/test_funcptrfunc.c | 0 .../emscripten/emtests}/test_funcptrfunc.out | 0 .../emscripten/emtests}/test_funcptrfunc.wasm | Bin .../emscripten/emtests}/test_funcs.c | 0 .../emscripten/emtests}/test_funcs.out | 0 .../emscripten/emtests}/test_funcs.wasm | Bin .../test_functionpointer_libfunc_varargs.c | 0 .../test_functionpointer_libfunc_varargs.out | 0 .../test_functionpointer_libfunc_varargs.wasm | Bin .../emscripten/emtests}/test_fwrite_0.c | 0 .../emscripten/emtests}/test_fwrite_0.out | 0 .../emscripten/emtests}/test_fwrite_0.wasm | Bin .../emscripten/emtests}/test_getgep.c | 0 .../emscripten/emtests}/test_getgep.out | 0 .../emscripten/emtests}/test_getgep.wasm | Bin .../emscripten/emtests}/test_getloadavg.c | 0 .../emscripten/emtests}/test_getloadavg.out | 0 .../emscripten/emtests}/test_getloadavg.wasm | Bin .../emscripten/emtests}/test_getopt.c | 0 .../emscripten/emtests}/test_getopt.out | 0 .../emscripten/emtests}/test_getopt.wasm | Bin .../emscripten/emtests}/test_getopt_long.c | 0 .../emscripten/emtests}/test_getopt_long.out | 0 .../emscripten/emtests}/test_getopt_long.wasm | Bin .../emscripten/emtests}/test_globaldoubles.c | 0 .../emtests}/test_globaldoubles.out | 0 .../emtests}/test_globaldoubles.wasm | Bin .../emscripten/emtests}/test_globals.c | 0 .../emscripten/emtests}/test_globals.out | 0 .../emscripten/emtests}/test_globals.wasm | Bin .../emscripten/emtests}/test_gmtime.c | 0 .../emscripten/emtests}/test_gmtime.out | 0 .../emscripten/emtests}/test_gmtime.wasm | Bin .../emscripten/emtests}/test_hello_world.c | 0 .../emscripten/emtests}/test_hello_world.out | 0 .../emscripten/emtests}/test_hello_world.wasm | Bin .../emtests}/test_i16_emcc_intrinsic.c | 0 .../emtests}/test_i16_emcc_intrinsic.out | 0 .../emtests}/test_i16_emcc_intrinsic.wasm | Bin .../emtests}/test_i32_mul_precise.c | 0 .../emtests}/test_i32_mul_precise.out | 0 .../emtests}/test_i32_mul_precise.wasm | Bin .../emscripten/emtests}/test_i64.c | 0 .../emscripten/emtests}/test_i64.out | 0 .../emscripten/emtests}/test_i64.wasm | Bin .../emscripten/emtests}/test_i64_2.c | 0 .../emscripten/emtests}/test_i64_2.out | 0 .../emscripten/emtests}/test_i64_3.c | 0 .../emscripten/emtests}/test_i64_3.out | 0 .../emscripten/emtests}/test_i64_4.c | 0 .../emscripten/emtests}/test_i64_4.out | 0 .../emscripten/emtests}/test_i64_4.wasm | Bin .../emscripten/emtests}/test_i64_7z.c | 0 .../emscripten/emtests}/test_i64_7z.out | 0 .../emscripten/emtests}/test_i64_7z.wasm | Bin .../emscripten/emtests}/test_i64_b.c | 0 .../emscripten/emtests}/test_i64_b.out | 0 .../emscripten/emtests}/test_i64_cmp.c | 0 .../emscripten/emtests}/test_i64_cmp.out | 0 .../emscripten/emtests}/test_i64_cmp2.c | 0 .../emscripten/emtests}/test_i64_cmp2.out | 0 .../emscripten/emtests}/test_i64_cmp2.wasm | Bin .../emscripten/emtests}/test_i64_double.c | 0 .../emscripten/emtests}/test_i64_double.out | 0 .../emscripten/emtests}/test_i64_i16.c | 0 .../emscripten/emtests}/test_i64_i16.out | 0 .../emscripten/emtests}/test_i64_i16.wasm | Bin .../emscripten/emtests}/test_i64_llabs.c | 0 .../emscripten/emtests}/test_i64_llabs.out | 0 .../emscripten/emtests}/test_i64_llabs.wasm | Bin .../emscripten/emtests}/test_i64_precise.c | 0 .../emscripten/emtests}/test_i64_precise.out | 0 .../emscripten/emtests}/test_i64_precise.wasm | Bin .../emtests}/test_i64_precise_needed.c | 0 .../emtests}/test_i64_precise_needed.out | 0 .../emtests}/test_i64_precise_needed.wasm | Bin .../emtests}/test_i64_precise_unneeded.c | 0 .../emtests}/test_i64_precise_unneeded.out | 0 .../emtests}/test_i64_precise_unneeded.wasm | Bin .../emscripten/emtests}/test_i64_qdouble.c | 0 .../emscripten/emtests}/test_i64_qdouble.out | 0 .../emscripten/emtests}/test_i64_qdouble.wasm | Bin .../emscripten/emtests}/test_i64_umul.c | 0 .../emscripten/emtests}/test_i64_umul.out | 0 .../emscripten/emtests}/test_i64_umul.wasm | Bin .../emscripten/emtests}/test_i64_varargs.c | 0 .../emscripten/emtests}/test_i64_varargs.out | 0 .../emscripten/emtests}/test_i64_varargs.wasm | Bin .../emscripten/emtests}/test_i64_zextneg.c | 0 .../emscripten/emtests}/test_i64_zextneg.out | 0 .../emscripten/emtests}/test_i64_zextneg.wasm | Bin {emtests => lib/emscripten/emtests}/test_if.c | 0 .../emscripten/emtests}/test_if.out | 0 .../emscripten/emtests}/test_if.wasm | Bin .../emscripten/emtests}/test_if_else.c | 0 .../emscripten/emtests}/test_if_else.out | 0 .../emscripten/emtests}/test_if_else.wasm | Bin .../emscripten/emtests}/test_indirectbr.c | 0 .../emscripten/emtests}/test_indirectbr.out | 0 .../emscripten/emtests}/test_indirectbr.wasm | Bin .../emtests}/test_indirectbr_many.c | 0 .../emtests}/test_indirectbr_many.out | 0 .../emtests}/test_indirectbr_many.wasm | Bin .../emscripten/emtests}/test_inherit.c | 0 .../emscripten/emtests}/test_inherit.out | 0 .../emscripten/emtests}/test_inlinejs.c | 0 .../emscripten/emtests}/test_inlinejs.out | 0 .../emscripten/emtests}/test_inlinejs2.c | 0 .../emscripten/emtests}/test_inlinejs2.out | 0 .../emscripten/emtests}/test_inlinejs3.c | 0 .../emscripten/emtests}/test_inlinejs3.out | 0 .../emtests}/test_intentional_fault.c | 0 .../emtests}/test_intentional_fault.wasm | Bin .../emscripten/emtests}/test_intvars.c | 0 .../emscripten/emtests}/test_intvars.out | 0 .../emscripten/emtests}/test_isdigit_l.c | 0 .../emscripten/emtests}/test_isdigit_l.out | 0 .../emscripten/emtests}/test_isnan.c | 0 .../emscripten/emtests}/test_isnan.out | 0 .../emscripten/emtests}/test_isnan.wasm | Bin .../emscripten/emtests}/test_istream.c | 0 .../emscripten/emtests}/test_istream.out | 0 .../emscripten/emtests}/test_iswdigit.c | 0 .../emscripten/emtests}/test_iswdigit.out | 0 .../emscripten/emtests}/test_libcextra.c | 0 .../emscripten/emtests}/test_libcextra.out | 0 .../emscripten/emtests}/test_libcextra.wasm | Bin .../emscripten/emtests}/test_libgen.c | 0 .../emscripten/emtests}/test_libgen.out | 0 .../emscripten/emtests}/test_libgen.wasm | Bin .../emscripten/emtests}/test_linked_list.c | 0 .../emscripten/emtests}/test_linked_list.out | 0 .../emtests}/test_literal_negative_zero.c | 0 .../emtests}/test_literal_negative_zero.out | 0 .../emtests}/test_literal_negative_zero.wasm | Bin .../emscripten/emtests}/test_llrint.c | 0 .../emscripten/emtests}/test_llrint.out | 0 .../emscripten/emtests}/test_llrint.wasm | Bin .../emscripten/emtests}/test_llvm_fabs.c | 0 .../emscripten/emtests}/test_llvm_fabs.out | 0 .../emscripten/emtests}/test_llvm_fabs.wasm | Bin .../emtests}/test_llvm_intrinsics.cpp | 0 .../emtests}/test_llvm_intrinsics.out | 0 .../emtests}/test_llvm_intrinsics.wasm | Bin .../emscripten/emtests}/test_llvm_used.c | 0 .../emscripten/emtests}/test_llvm_used.out | 0 .../emscripten/emtests}/test_llvmswitch.c | 0 .../emscripten/emtests}/test_llvmswitch.out | 0 .../emscripten/emtests}/test_llvmswitch.wasm | Bin .../emscripten/emtests}/test_longjmp.c | 0 .../emscripten/emtests}/test_longjmp.out | 0 .../emscripten/emtests}/test_longjmp.wasm | Bin .../emscripten/emtests}/test_longjmp2.c | 0 .../emscripten/emtests}/test_longjmp2.out | 0 .../emscripten/emtests}/test_longjmp2.wasm | Bin .../emscripten/emtests}/test_longjmp3.c | 0 .../emscripten/emtests}/test_longjmp3.out | 0 .../emscripten/emtests}/test_longjmp3.wasm | Bin .../emscripten/emtests}/test_longjmp4.c | 0 .../emscripten/emtests}/test_longjmp4.out | 0 .../emscripten/emtests}/test_longjmp4.wasm | Bin .../emscripten/emtests}/test_longjmp_exc.c | 0 .../emscripten/emtests}/test_longjmp_exc.out | 0 .../emscripten/emtests}/test_longjmp_exc.wasm | Bin .../emtests}/test_longjmp_funcptr.c | 0 .../emtests}/test_longjmp_funcptr.out | 0 .../emtests}/test_longjmp_funcptr.wasm | Bin .../emscripten/emtests}/test_longjmp_repeat.c | 0 .../emtests}/test_longjmp_repeat.out | 0 .../emtests}/test_longjmp_repeat.wasm | Bin .../emtests}/test_longjmp_stacked.c | 0 .../emtests}/test_longjmp_stacked.out | 0 .../emtests}/test_longjmp_stacked.wasm | Bin .../emtests}/test_longjmp_throw.cpp | 0 .../emtests}/test_longjmp_throw.out | 0 .../emtests}/test_longjmp_throw.wasm | Bin .../emscripten/emtests}/test_longjmp_unwind.c | 0 .../emtests}/test_longjmp_unwind.out | 0 .../emtests}/test_longjmp_unwind.wasm | Bin .../emscripten/emtests}/test_loop.c | 0 .../emscripten/emtests}/test_loop.out | 0 .../emscripten/emtests}/test_loop.wasm | Bin .../emtests}/test_lower_intrinsics.c | 0 .../emtests}/test_lower_intrinsics.out | 0 .../emtests}/test_lower_intrinsics.wasm | Bin .../test_main_module_static_align.cpp | 0 .../test_main_module_static_align.txt | 0 .../test_main_module_static_align.wasm | Bin .../test_main_thread_async_em_asm.cpp | 0 .../test_main_thread_async_em_asm.out | 0 .../test_main_thread_async_em_asm.wasm | Bin .../emscripten/emtests}/test_mainenv.c | 0 .../emscripten/emtests}/test_mainenv.out | 0 .../emscripten/emtests}/test_mainenv.wasm | Bin .../emscripten/emtests}/test_math.c | 0 .../emscripten/emtests}/test_math.out | 0 .../emscripten/emtests}/test_mathfuncptr.c | 0 .../emscripten/emtests}/test_mathfuncptr.out | 0 .../emscripten/emtests}/test_mathfuncptr.wasm | Bin .../emscripten/emtests}/test_memcpy2.c | 0 .../emscripten/emtests}/test_memcpy2.out | 0 .../emscripten/emtests}/test_memcpy2.wasm | Bin .../emscripten/emtests}/test_memcpy3.c | 0 .../emscripten/emtests}/test_memcpy3.out | 0 .../emscripten/emtests}/test_memcpy3.wasm | Bin .../emscripten/emtests}/test_memcpy_memcmp.c | 0 .../emtests}/test_memcpy_memcmp.out | 0 .../emtests}/test_memcpy_memcmp.wasm | Bin .../emscripten/emtests}/test_memmove.c | 0 .../emscripten/emtests}/test_memmove.out | 0 .../emscripten/emtests}/test_memmove.wasm | Bin .../emscripten/emtests}/test_memmove2.c | 0 .../emscripten/emtests}/test_memmove2.out | 0 .../emscripten/emtests}/test_memmove2.wasm | Bin .../emscripten/emtests}/test_memmove3.c | 0 .../emscripten/emtests}/test_memmove3.out | 0 .../emscripten/emtests}/test_memmove3.wasm | Bin .../emscripten/emtests}/test_memorygrowth.c | 0 .../emtests}/test_memorygrowth.wasm | Bin .../emscripten/emtests}/test_memorygrowth_2.c | 0 .../emtests}/test_memorygrowth_2.wasm | Bin .../emscripten/emtests}/test_memorygrowth_3.c | 0 .../emtests}/test_memorygrowth_3.txt | 0 .../emtests}/test_memorygrowth_3.wasm | Bin .../emtests}/test_memorygrowth_wasm_mem_max.c | 0 .../test_memorygrowth_wasm_mem_max.txt | 0 .../test_memorygrowth_wasm_mem_max.wasm | Bin .../emscripten/emtests}/test_memset.c | 0 .../emscripten/emtests}/test_memset.out | 0 .../emscripten/emtests}/test_memset.wasm | Bin .../emscripten/emtests}/test_mmap.c | 0 .../emscripten/emtests}/test_mmap.out | 0 .../emscripten/emtests}/test_mmap.wasm | Bin .../emtests}/test_mod_globalstruct.c | 0 .../emtests}/test_mod_globalstruct.out | 0 .../emscripten/emtests}/test_negative_zero.c | 0 .../emtests}/test_negative_zero.out | 0 .../emtests}/test_negative_zero.wasm | Bin .../emtests}/test_nested_struct_varargs.c | 0 .../emtests}/test_nested_struct_varargs.out | 0 .../emtests}/test_nested_struct_varargs.wasm | Bin .../emscripten/emtests}/test_nl_types.c | 0 .../emscripten/emtests}/test_nl_types.out | 0 .../emscripten/emtests}/test_nl_types.wasm | Bin .../emscripten/emtests}/test_perrar.c | 0 .../emscripten/emtests}/test_perrar.out | 0 .../emscripten/emtests}/test_perrar.wasm | Bin .../emscripten/emtests}/test_phiundef.c | 0 .../emscripten/emtests}/test_phiundef.out | 0 .../emscripten/emtests}/test_phiundef.wasm | Bin .../emscripten/emtests}/test_poll.c | 0 .../emscripten/emtests}/test_poll.out | 0 .../emscripten/emtests}/test_poll.wasm | Bin .../emscripten/emtests}/test_polymorph.c | 0 .../emscripten/emtests}/test_polymorph.out | 0 .../emscripten/emtests}/test_posixtime.c | 0 .../emscripten/emtests}/test_posixtime.out | 0 .../emscripten/emtests}/test_posixtime.wasm | Bin .../emtests}/test_posixtime_no_monotonic.out | 0 .../emscripten/emtests}/test_printf_2.c | 0 .../emscripten/emtests}/test_printf_2.out | 0 .../emscripten/emtests}/test_printf_2.wasm | Bin .../emscripten/emtests}/test_printf_more.c | 0 .../emscripten/emtests}/test_printf_more.out | 0 .../emscripten/emtests}/test_printf_more.wasm | Bin .../emscripten/emtests}/test_ptrtoint.out | 0 .../emtests}/test_random_device.cpp | 0 .../emtests}/test_random_device.txt | 0 .../emscripten/emtests}/test_regex.c | 0 .../emscripten/emtests}/test_regex.out | 0 .../emscripten/emtests}/test_regex.wasm | Bin .../emtests}/test_reinterpreted_ptrs.c | 0 .../emtests}/test_reinterpreted_ptrs.out | 0 .../emtests}/test_relocatable_void_function.c | 0 .../test_relocatable_void_function.out | 0 .../test_relocatable_void_function.wasm | Bin .../emscripten/emtests}/test_rounding.c | 0 .../emscripten/emtests}/test_rounding.out | 0 .../emscripten/emtests}/test_rounding.wasm | Bin .../emtests}/test_runtime_stacksave.c | 0 .../emtests}/test_runtime_stacksave.wasm | Bin .../emscripten/emtests}/test_set_align.c | 0 .../emscripten/emtests}/test_set_align.out | 0 .../emscripten/emtests}/test_set_align.wasm | Bin .../emscripten/emtests}/test_siglongjmp.c | 0 .../emscripten/emtests}/test_siglongjmp.out | 0 .../emscripten/emtests}/test_siglongjmp.wasm | Bin .../emscripten/emtests}/test_simd.c | 0 .../emscripten/emtests}/test_simd.out | 0 .../emscripten/emtests}/test_simd10.c | 0 .../emscripten/emtests}/test_simd10.out | 0 .../emscripten/emtests}/test_simd11.c | 0 .../emscripten/emtests}/test_simd11.out | 0 .../emscripten/emtests}/test_simd12.c | 0 .../emscripten/emtests}/test_simd12.out | 0 .../emscripten/emtests}/test_simd13.c | 0 .../emscripten/emtests}/test_simd13.out | 0 .../emscripten/emtests}/test_simd14.c | 0 .../emscripten/emtests}/test_simd14.out | 0 .../emscripten/emtests}/test_simd15.c | 0 .../emscripten/emtests}/test_simd15.out | 0 .../emscripten/emtests}/test_simd16.c | 0 .../emscripten/emtests}/test_simd16.out | 0 .../emscripten/emtests}/test_simd2.c | 0 .../emscripten/emtests}/test_simd2.out | 0 .../emscripten/emtests}/test_simd3.c | 0 .../emscripten/emtests}/test_simd3.out | 0 .../emscripten/emtests}/test_simd4.c | 0 .../emscripten/emtests}/test_simd4.out | 0 .../emscripten/emtests}/test_simd5.c | 0 .../emscripten/emtests}/test_simd5.out | 0 .../emscripten/emtests}/test_simd6.c | 0 .../emscripten/emtests}/test_simd6.out | 0 .../emscripten/emtests}/test_simd7.c | 0 .../emscripten/emtests}/test_simd7.out | 0 .../emscripten/emtests}/test_simd8.c | 0 .../emscripten/emtests}/test_simd8.out | 0 .../emscripten/emtests}/test_simd9.c | 0 .../emscripten/emtests}/test_simd9.out | 0 .../emscripten/emtests}/test_simd_dyncall.cpp | 0 .../emscripten/emtests}/test_simd_dyncall.txt | 0 .../emscripten/emtests}/test_simd_float32x4.c | 0 .../emtests}/test_simd_float32x4.out | 0 .../emscripten/emtests}/test_simd_float64x2.c | 0 .../emtests}/test_simd_float64x2.out | 0 .../emscripten/emtests}/test_simd_int16x8.c | 0 .../emscripten/emtests}/test_simd_int16x8.out | 0 .../emscripten/emtests}/test_simd_int32x4.c | 0 .../emscripten/emtests}/test_simd_int32x4.out | 0 .../emscripten/emtests}/test_simd_int8x16.c | 0 .../emscripten/emtests}/test_simd_int8x16.out | 0 .../emtests}/test_simd_set_epi64x.c | 0 .../emtests}/test_simd_set_epi64x.out | 0 .../emtests}/test_simd_shift_right.c | 0 .../emtests}/test_simd_shift_right.out | 0 .../emscripten/emtests}/test_simd_sitofp.c | 0 .../emscripten/emtests}/test_simd_sitofp.out | 0 .../emscripten/emtests}/test_sintvars.c | 0 .../emscripten/emtests}/test_sintvars.out | 0 .../emscripten/emtests}/test_sintvars.wasm | Bin .../emscripten/emtests}/test_sizeof.cpp | 0 .../emscripten/emtests}/test_sizeof.out | 0 .../emscripten/emtests}/test_sizeof.wasm | Bin .../emscripten/emtests}/test_sscanf.c | 0 .../emscripten/emtests}/test_sscanf.out | 0 .../emscripten/emtests}/test_sscanf.wasm | Bin .../emscripten/emtests}/test_sscanf_3.c | 0 .../emscripten/emtests}/test_sscanf_3.out | 0 .../emscripten/emtests}/test_sscanf_3.wasm | Bin .../emscripten/emtests}/test_sscanf_4.c | 0 .../emscripten/emtests}/test_sscanf_4.out | 0 .../emscripten/emtests}/test_sscanf_4.wasm | Bin .../emscripten/emtests}/test_sscanf_5.c | 0 .../emscripten/emtests}/test_sscanf_5.out | 0 .../emscripten/emtests}/test_sscanf_5.wasm | Bin .../emscripten/emtests}/test_sscanf_6.c | 0 .../emscripten/emtests}/test_sscanf_6.out | 0 .../emscripten/emtests}/test_sscanf_6.wasm | Bin .../emscripten/emtests}/test_sscanf_caps.c | 0 .../emscripten/emtests}/test_sscanf_caps.out | 0 .../emscripten/emtests}/test_sscanf_caps.wasm | Bin .../emscripten/emtests}/test_sscanf_float.c | 0 .../emscripten/emtests}/test_sscanf_float.out | 0 .../emtests}/test_sscanf_float.wasm | Bin .../emscripten/emtests}/test_sscanf_hex.cpp | 0 .../emscripten/emtests}/test_sscanf_hex.out | 0 .../emscripten/emtests}/test_sscanf_hex.wasm | Bin .../emscripten/emtests}/test_sscanf_n.c | 0 .../emscripten/emtests}/test_sscanf_n.out | 0 .../emscripten/emtests}/test_sscanf_n.wasm | Bin .../emtests}/test_sscanf_other_whitespace.c | 0 .../emtests}/test_sscanf_other_whitespace.out | 0 .../test_sscanf_other_whitespace.wasm | Bin .../emscripten/emtests}/test_sscanf_skip.c | 0 .../emscripten/emtests}/test_sscanf_skip.out | 0 .../emscripten/emtests}/test_sscanf_skip.wasm | Bin .../emtests}/test_sscanf_whitespace.c | 0 .../emtests}/test_sscanf_whitespace.out | 0 .../emtests}/test_sscanf_whitespace.wasm | Bin .../emscripten/emtests}/test_stack.c | 0 .../emscripten/emtests}/test_stack.out | 0 .../emscripten/emtests}/test_stack_align.cpp | 0 .../emscripten/emtests}/test_stack_align.wasm | Bin .../emscripten/emtests}/test_stack_byval.c | 0 .../emscripten/emtests}/test_stack_byval.out | 0 .../emscripten/emtests}/test_stack_restore.c | 0 .../emtests}/test_stack_restore.out | 0 .../emscripten/emtests}/test_stack_varargs.c | 0 .../emtests}/test_stack_varargs.out | 0 .../emtests}/test_stack_varargs.wasm | Bin .../emscripten/emtests}/test_stack_void.c | 0 .../emscripten/emtests}/test_stack_void.out | 0 .../emscripten/emtests}/test_stack_void.wasm | Bin .../emtests}/test_static_variable.c | 0 .../emtests}/test_static_variable.out | 0 .../emscripten/emtests}/test_statics.c | 0 .../emscripten/emtests}/test_statics.out | 0 .../emscripten/emtests}/test_statvfs.c | 0 .../emscripten/emtests}/test_statvfs.out | 0 .../emscripten/emtests}/test_statvfs.wasm | Bin .../emscripten/emtests}/test_std_cout_new.cpp | 0 .../emscripten/emtests}/test_std_cout_new.out | 0 .../emtests}/test_std_cout_new.wasm | Bin .../emscripten/emtests}/test_stdlibs.c | 0 .../emscripten/emtests}/test_stdlibs.out | 0 .../emscripten/emtests}/test_stdvec.c | 0 .../emscripten/emtests}/test_stdvec.out | 0 .../emscripten/emtests}/test_strcasecmp.c | 0 .../emscripten/emtests}/test_strcasecmp.out | 0 .../emscripten/emtests}/test_strcasecmp.wasm | Bin .../emscripten/emtests}/test_strcmp_uni.c | 0 .../emscripten/emtests}/test_strcmp_uni.out | 0 .../emscripten/emtests}/test_strcmp_uni.wasm | Bin .../emscripten/emtests}/test_strftime.cpp | 0 .../emscripten/emtests}/test_strftime.out | 0 .../emscripten/emtests}/test_strftime.wasm | Bin .../emscripten/emtests}/test_strings.c | 0 .../emscripten/emtests}/test_strings.out | 0 .../emscripten/emtests}/test_strings.wasm | Bin .../emscripten/emtests}/test_strndup.c | 0 .../emscripten/emtests}/test_strndup.out | 0 .../emscripten/emtests}/test_strndup.wasm | Bin .../emscripten/emtests}/test_strptime_days.c | 0 .../emtests}/test_strptime_days.out | 0 .../emtests}/test_strptime_days.wasm | Bin .../emtests}/test_strptime_reentrant.c | 0 .../emtests}/test_strptime_reentrant.out | 0 .../emtests}/test_strptime_reentrant.wasm | Bin .../emscripten/emtests}/test_strptime_tm.c | 0 .../emscripten/emtests}/test_strptime_tm.out | 0 .../emscripten/emtests}/test_strstr.c | 0 .../emscripten/emtests}/test_strstr.out | 0 .../emscripten/emtests}/test_strstr.wasm | Bin .../emscripten/emtests}/test_strtod.c | 0 .../emscripten/emtests}/test_strtod.out | 0 .../emscripten/emtests}/test_strtod.wasm | Bin .../emscripten/emtests}/test_strtok.c | 0 .../emscripten/emtests}/test_strtok.out | 0 .../emscripten/emtests}/test_strtok.wasm | Bin .../emscripten/emtests}/test_strtol_bin.c | 0 .../emscripten/emtests}/test_strtol_bin.out | 0 .../emscripten/emtests}/test_strtol_bin.wasm | Bin .../emscripten/emtests}/test_strtol_dec.c | 0 .../emscripten/emtests}/test_strtol_dec.out | 0 .../emscripten/emtests}/test_strtol_dec.wasm | Bin .../emscripten/emtests}/test_strtol_hex.c | 0 .../emscripten/emtests}/test_strtol_hex.out | 0 .../emscripten/emtests}/test_strtol_hex.wasm | Bin .../emscripten/emtests}/test_strtol_oct.c | 0 .../emscripten/emtests}/test_strtol_oct.out | 0 .../emscripten/emtests}/test_strtol_oct.wasm | Bin .../emscripten/emtests}/test_strtold.c | 0 .../emscripten/emtests}/test_strtold.out | 0 .../emscripten/emtests}/test_strtold.wasm | Bin .../emscripten/emtests}/test_strtoll_bin.c | 0 .../emscripten/emtests}/test_strtoll_bin.out | 0 .../emscripten/emtests}/test_strtoll_bin.wasm | Bin .../emscripten/emtests}/test_strtoll_dec.c | 0 .../emscripten/emtests}/test_strtoll_dec.out | 0 .../emscripten/emtests}/test_strtoll_dec.wasm | Bin .../emscripten/emtests}/test_strtoll_hex.c | 0 .../emscripten/emtests}/test_strtoll_hex.out | 0 .../emscripten/emtests}/test_strtoll_hex.wasm | Bin .../emscripten/emtests}/test_strtoll_oct.c | 0 .../emscripten/emtests}/test_strtoll_oct.out | 0 .../emscripten/emtests}/test_strtoll_oct.wasm | Bin .../emscripten/emtests}/test_struct_varargs.c | 0 .../emtests}/test_struct_varargs.out | 0 .../emtests}/test_struct_varargs.wasm | Bin .../emscripten/emtests}/test_structs.c | 0 .../emscripten/emtests}/test_structs.out | 0 .../emscripten/emtests}/test_time_c.c | 0 .../emscripten/emtests}/test_time_c.out | 0 .../emscripten/emtests}/test_time_c.wasm | Bin .../emscripten/emtests}/test_timeb.c | 0 .../emscripten/emtests}/test_timeb.out | 0 .../emscripten/emtests}/test_tinyfuncstr.c | 0 .../emscripten/emtests}/test_tinyfuncstr.out | 0 .../emscripten/emtests}/test_tracing.c | 0 .../emscripten/emtests}/test_tracing.out | 0 .../emscripten/emtests}/test_tracing.wasm | Bin .../emscripten/emtests}/test_transtrcase.c | 0 .../emscripten/emtests}/test_transtrcase.out | 0 .../emscripten/emtests}/test_transtrcase.wasm | Bin .../emscripten/emtests}/test_trickystring.c | 0 .../emscripten/emtests}/test_trickystring.out | 0 .../emtests}/test_trickystring.wasm | Bin .../emscripten/emtests}/test_typeid.c | 0 .../emscripten/emtests}/test_typeid.out | 0 .../emscripten/emtests}/test_uname.c | 0 .../emscripten/emtests}/test_uname.out | 0 .../emscripten/emtests}/test_uname.wasm | Bin .../emtests}/test_unary_literal.cpp | 0 .../emtests}/test_unary_literal.out | 0 .../emtests}/test_unary_literal.wasm | Bin .../emscripten/emtests}/test_utf.c | 0 .../emscripten/emtests}/test_utf.out | 0 .../emscripten/emtests}/test_utf.wasm | Bin .../emscripten/emtests}/test_varargs.c | 0 .../emscripten/emtests}/test_varargs.out | 0 .../emscripten/emtests}/test_varargs.wasm | Bin .../emscripten/emtests}/test_varargs_multi.c | 0 .../emtests}/test_varargs_multi.out | 0 .../emtests}/test_varargs_multi.wasm | Bin .../emscripten/emtests}/test_vprintf.c | 0 .../emscripten/emtests}/test_vprintf.out | 0 .../emscripten/emtests}/test_vprintf.wasm | Bin .../emscripten/emtests}/test_vsnprintf.c | 0 .../emscripten/emtests}/test_vsnprintf.out | 0 .../emscripten/emtests}/test_vsnprintf.wasm | Bin .../emscripten/emtests}/test_wprintf.cpp | 0 .../emscripten/emtests}/test_wprintf.out | 0 .../emscripten/emtests}/test_wprintf.wasm | Bin .../emtests}/test_write_stdout_fileno.c | 0 .../emtests}/test_write_stdout_fileno.out | 0 .../emtests}/test_write_stdout_fileno.wasm | Bin .../emtests}/test_zero_multiplication.c | 0 .../emtests}/test_zero_multiplication.out | 0 .../emtests}/test_zero_multiplication.wasm | Bin .../emscripten/emtests}/test_zerodiv.c | 0 .../emscripten/emtests}/test_zerodiv.out | 0 .../emscripten/emtests}/test_zerodiv.wasm | Bin .../emscripten/src}/README.md | 0 .../emscripten => lib/emscripten/src}/env.rs | 2 +- .../emscripten/src}/errno.rs | 0 .../emscripten/src}/exception.rs | 2 +- .../emscripten => lib/emscripten/src}/io.rs | 0 .../emscripten => lib/emscripten/src}/jmp.rs | 0 .../mod.rs => lib/emscripten/src/lib.rs | 3 + .../emscripten/src}/linking.rs | 0 .../emscripten => lib/emscripten/src}/lock.rs | 0 .../emscripten => lib/emscripten/src}/math.rs | 0 .../emscripten/src}/memory.rs | 0 .../emscripten/src}/nullfunc.rs | 0 .../emscripten/src}/process.rs | 0 .../emscripten/src}/signal.rs | 0 .../emscripten/src}/storage.rs | 0 .../emscripten/src}/syscalls.rs | 2 +- .../src}/tests/is_emscripten_false.wast | 0 .../src}/tests/is_emscripten_true.wast | 0 .../emscripten => lib/emscripten/src}/time.rs | 2 +- .../emscripten/src}/utils.rs | 15 +- .../emscripten/src}/varargs.rs | 0 lib/emscripten/tests/emtest.rs | 1 + lib/emscripten/tests/emtests/_common.rs | 46 ++ .../tests}/emtests/clock_gettime.rs | 0 .../emscripten_get_compiler_setting.rs | 0 {src => lib/emscripten/tests}/emtests/env.rs | 0 .../emscripten/tests}/emtests/fs_exports.rs | 0 .../tests}/emtests/getvalue_setvalue.rs | 0 .../legacy_exported_runtime_numbers.rs | 0 .../emscripten/tests}/emtests/localtime.rs | 0 {src => lib/emscripten/tests}/emtests/mod.rs | 0 .../tests}/emtests/modularize_closure_pre.rs | 0 .../emscripten/tests}/emtests/printf.rs | 0 {src => lib/emscripten/tests}/emtests/puts.rs | 0 .../emscripten/tests}/emtests/stackalloc.rs | 0 .../emscripten/tests}/emtests/syscalls.rs | 0 .../tests}/emtests/test_addr_of_stacked.rs | 0 .../emscripten/tests}/emtests/test_alloca.rs | 0 .../tests}/emtests/test_alloca_stack.rs | 0 .../emscripten/tests}/emtests/test_array2.rs | 0 .../emscripten/tests}/emtests/test_array2b.rs | 0 .../emscripten/tests}/emtests/test_atomic.rs | 0 .../emscripten/tests}/emtests/test_atox.rs | 0 .../emscripten/tests}/emtests/test_bsearch.rs | 0 .../emscripten/tests}/emtests/test_ccall.rs | 0 .../emscripten/tests}/emtests/test_complex.rs | 0 .../tests}/emtests/test_demangle_stacks.rs | 0 .../emtests/test_demangle_stacks_noassert.rs | 0 .../tests}/emtests/test_dlmalloc_partial_2.rs | 0 .../tests}/emtests/test_double_varargs.rs | 0 .../emscripten/tests}/emtests/test_em_asm.rs | 0 .../tests}/emtests/test_em_asm_2.rs | 0 .../emtests/test_em_asm_parameter_pack.rs | 0 .../tests}/emtests/test_em_asm_signatures.rs | 0 .../tests}/emtests/test_em_asm_unicode.rs | 0 .../emtests/test_em_asm_unused_arguments.rs | 0 .../emscripten/tests}/emtests/test_em_js.rs | 0 .../tests}/emtests/test_emscripten_api.rs | 0 .../emscripten/tests}/emtests/test_erf.rs | 0 .../emscripten/tests}/emtests/test_errar.rs | 0 .../tests}/emtests/test_exceptions_2.rs | 0 .../tests}/emtests/test_exceptions_multi.rs | 0 .../tests}/emtests/test_exceptions_std.rs | 0 .../emtests/test_exceptions_white_list.rs | 0 .../tests}/emtests/test_fast_math.rs | 0 .../tests}/emtests/test_flexarray_struct.rs | 0 .../tests}/emtests/test_float32_precise.rs | 0 .../tests}/emtests/test_float_builtins.rs | 0 .../emscripten/tests}/emtests/test_frexp.rs | 0 .../emscripten/tests}/emtests/test_funcptr.rs | 0 .../emtests/test_funcptr_namecollide.rs | 0 .../tests}/emtests/test_funcptrfunc.rs | 0 .../emscripten/tests}/emtests/test_funcs.rs | 0 .../test_functionpointer_libfunc_varargs.rs | 0 .../tests}/emtests/test_fwrite_0.rs | 0 .../emscripten/tests}/emtests/test_getgep.rs | 0 .../tests}/emtests/test_getloadavg.rs | 0 .../emscripten/tests}/emtests/test_getopt.rs | 0 .../tests}/emtests/test_getopt_long.rs | 0 .../tests}/emtests/test_globaldoubles.rs | 0 .../emscripten/tests}/emtests/test_globals.rs | 0 .../emscripten/tests}/emtests/test_gmtime.rs | 0 .../tests}/emtests/test_hello_world.rs | 0 .../tests}/emtests/test_i16_emcc_intrinsic.rs | 0 .../tests}/emtests/test_i32_mul_precise.rs | 0 .../emscripten/tests}/emtests/test_i64.rs | 0 .../emscripten/tests}/emtests/test_i64_4.rs | 0 .../emscripten/tests}/emtests/test_i64_7z.rs | 0 .../tests}/emtests/test_i64_cmp2.rs | 0 .../emscripten/tests}/emtests/test_i64_i16.rs | 0 .../tests}/emtests/test_i64_llabs.rs | 0 .../tests}/emtests/test_i64_precise.rs | 0 .../tests}/emtests/test_i64_precise_needed.rs | 0 .../emtests/test_i64_precise_unneeded.rs | 0 .../tests}/emtests/test_i64_qdouble.rs | 0 .../tests}/emtests/test_i64_umul.rs | 0 .../tests}/emtests/test_i64_varargs.rs | 0 .../tests}/emtests/test_i64_zextneg.rs | 0 .../emscripten/tests}/emtests/test_if.rs | 0 .../emscripten/tests}/emtests/test_if_else.rs | 0 .../tests}/emtests/test_indirectbr.rs | 0 .../tests}/emtests/test_indirectbr_many.rs | 0 .../emscripten/tests}/emtests/test_isnan.rs | 0 .../tests}/emtests/test_libcextra.rs | 0 .../emscripten/tests}/emtests/test_libgen.rs | 0 .../emtests/test_literal_negative_zero.rs | 0 .../emscripten/tests}/emtests/test_llrint.rs | 0 .../tests}/emtests/test_llvm_fabs.rs | 0 .../tests}/emtests/test_llvm_intrinsics.rs | 0 .../tests}/emtests/test_llvmswitch.rs | 0 .../emscripten/tests}/emtests/test_longjmp.rs | 0 .../tests}/emtests/test_longjmp2.rs | 0 .../tests}/emtests/test_longjmp3.rs | 0 .../tests}/emtests/test_longjmp4.rs | 0 .../tests}/emtests/test_longjmp_exc.rs | 0 .../tests}/emtests/test_longjmp_funcptr.rs | 0 .../tests}/emtests/test_longjmp_repeat.rs | 0 .../tests}/emtests/test_longjmp_stacked.rs | 0 .../tests}/emtests/test_longjmp_throw.rs | 0 .../tests}/emtests/test_longjmp_unwind.rs | 0 .../emscripten/tests}/emtests/test_loop.rs | 0 .../tests}/emtests/test_lower_intrinsics.rs | 0 .../emtests/test_main_thread_async_em_asm.rs | 0 .../emscripten/tests}/emtests/test_mainenv.rs | 0 .../tests}/emtests/test_mathfuncptr.rs | 0 .../emscripten/tests}/emtests/test_memcpy2.rs | 0 .../emscripten/tests}/emtests/test_memcpy3.rs | 0 .../tests}/emtests/test_memcpy_memcmp.rs | 0 .../emscripten/tests}/emtests/test_memmove.rs | 0 .../tests}/emtests/test_memmove2.rs | 0 .../tests}/emtests/test_memmove3.rs | 0 .../emscripten/tests}/emtests/test_memset.rs | 0 .../emscripten/tests}/emtests/test_mmap.rs | 0 .../tests}/emtests/test_negative_zero.rs | 0 .../emtests/test_nested_struct_varargs.rs | 0 .../tests}/emtests/test_nl_types.rs | 0 .../emscripten/tests}/emtests/test_perrar.rs | 0 .../tests}/emtests/test_phiundef.rs | 0 .../emscripten/tests}/emtests/test_poll.rs | 0 .../tests}/emtests/test_posixtime.rs | 0 .../tests}/emtests/test_printf_2.rs | 0 .../tests}/emtests/test_printf_more.rs | 0 .../emscripten/tests}/emtests/test_regex.rs | 0 .../emtests/test_relocatable_void_function.rs | 0 .../tests}/emtests/test_rounding.rs | 0 .../tests}/emtests/test_set_align.rs | 0 .../tests}/emtests/test_siglongjmp.rs | 0 .../tests}/emtests/test_sintvars.rs | 0 .../emscripten/tests}/emtests/test_sizeof.rs | 0 .../emscripten/tests}/emtests/test_sscanf.rs | 0 .../tests}/emtests/test_sscanf_3.rs | 0 .../tests}/emtests/test_sscanf_4.rs | 0 .../tests}/emtests/test_sscanf_5.rs | 0 .../tests}/emtests/test_sscanf_6.rs | 0 .../tests}/emtests/test_sscanf_caps.rs | 0 .../tests}/emtests/test_sscanf_float.rs | 0 .../tests}/emtests/test_sscanf_hex.rs | 0 .../tests}/emtests/test_sscanf_n.rs | 0 .../emtests/test_sscanf_other_whitespace.rs | 0 .../tests}/emtests/test_sscanf_skip.rs | 0 .../tests}/emtests/test_sscanf_whitespace.rs | 0 .../tests}/emtests/test_stack_varargs.rs | 0 .../tests}/emtests/test_stack_void.rs | 0 .../emscripten/tests}/emtests/test_statvfs.rs | 0 .../tests}/emtests/test_std_cout_new.rs | 0 .../tests}/emtests/test_strcasecmp.rs | 0 .../tests}/emtests/test_strcmp_uni.rs | 0 .../tests}/emtests/test_strftime.rs | 0 .../emscripten/tests}/emtests/test_strings.rs | 0 .../emscripten/tests}/emtests/test_strndup.rs | 0 .../tests}/emtests/test_strptime_days.rs | 0 .../tests}/emtests/test_strptime_reentrant.rs | 0 .../emscripten/tests}/emtests/test_strstr.rs | 0 .../emscripten/tests}/emtests/test_strtod.rs | 0 .../emscripten/tests}/emtests/test_strtok.rs | 0 .../tests}/emtests/test_strtol_bin.rs | 0 .../tests}/emtests/test_strtol_dec.rs | 0 .../tests}/emtests/test_strtol_hex.rs | 0 .../tests}/emtests/test_strtol_oct.rs | 0 .../emscripten/tests}/emtests/test_strtold.rs | 0 .../tests}/emtests/test_strtoll_bin.rs | 0 .../tests}/emtests/test_strtoll_dec.rs | 0 .../tests}/emtests/test_strtoll_hex.rs | 0 .../tests}/emtests/test_strtoll_oct.rs | 0 .../tests}/emtests/test_struct_varargs.rs | 0 .../emscripten/tests}/emtests/test_time_c.rs | 0 .../emscripten/tests}/emtests/test_tracing.rs | 0 .../tests}/emtests/test_transtrcase.rs | 0 .../tests}/emtests/test_trickystring.rs | 0 .../emscripten/tests}/emtests/test_uname.rs | 0 .../tests}/emtests/test_unary_literal.rs | 0 .../emscripten/tests}/emtests/test_utf.rs | 0 .../emscripten/tests}/emtests/test_varargs.rs | 0 .../tests}/emtests/test_varargs_multi.rs | 0 .../emscripten/tests}/emtests/test_vprintf.rs | 0 .../tests}/emtests/test_vsnprintf.rs | 0 .../emscripten/tests}/emtests/test_wprintf.rs | 0 .../emtests/test_write_stdout_fileno.rs | 0 .../emtests/test_zero_multiplication.rs | 0 .../emscripten/tests}/emtests/test_zerodiv.rs | 0 lib/runtime/Cargo.toml | 8 +- src/apis/host/mod.rs | 4 - src/apis/host/posix/env.rs | 4 - src/apis/host/posix/mod.rs | 5 - src/apis/host/posix/syscalls.rs | 48 -- src/apis/mod.rs | 4 - src/bin/wasmer.rs | 5 +- src/common/stdio.rs | 2 +- src/emtests/_common.rs | 39 - src/lib.rs | 4 +- src/webassembly/mod.rs | 2 +- 990 files changed, 136 insertions(+), 857 deletions(-) delete mode 100644 build/mod.rs delete mode 100644 build/spectests.rs create mode 100644 lib/emscripten/Cargo.toml rename {build => lib/emscripten/build}/emtests.rs (98%) create mode 100644 lib/emscripten/build/mod.rs rename {emtests => lib/emscripten/emtests}/FS_exports.cpp (100%) rename {emtests => lib/emscripten/emtests}/FS_exports.txt (100%) rename {emtests => lib/emscripten/emtests}/FS_exports.wasm (100%) rename {emtests => lib/emscripten/emtests}/FS_exports_2.txt (100%) rename {emtests => lib/emscripten/emtests}/FS_exports_assert.txt (100%) rename {emtests => lib/emscripten/emtests}/FS_exports_assert_2.txt (100%) rename {emtests => lib/emscripten/emtests}/README.md (100%) rename {emtests => lib/emscripten/emtests}/clock_gettime.c (100%) rename {emtests => lib/emscripten/emtests}/clock_gettime.out (100%) rename {emtests => lib/emscripten/emtests}/clock_gettime.wasm (100%) rename {emtests => lib/emscripten/emtests}/closebitcasts.c (100%) rename {emtests => lib/emscripten/emtests}/closebitcasts.txt (100%) rename {emtests => lib/emscripten/emtests}/closebitcasts.wasm (100%) rename {emtests => lib/emscripten/emtests}/dyncall.c (100%) rename {emtests => lib/emscripten/emtests}/dyncall.txt (100%) rename {emtests => lib/emscripten/emtests}/dyncall.wasm (100%) rename {emtests => lib/emscripten/emtests}/dyncall_specific.c (100%) rename {emtests => lib/emscripten/emtests}/dyncall_specific.txt (100%) rename {emtests => lib/emscripten/emtests}/dyncall_specific.wasm (100%) rename {emtests => lib/emscripten/emtests}/emscripten_get_compiler_setting.c (100%) rename {emtests => lib/emscripten/emtests}/emscripten_get_compiler_setting.out (100%) rename {emtests => lib/emscripten/emtests}/emscripten_get_compiler_setting.wasm (100%) rename {emtests => lib/emscripten/emtests}/env.c (100%) rename {emtests => lib/emscripten/emtests}/env.out (100%) rename {emtests => lib/emscripten/emtests}/env.wasm (100%) rename {emtests => lib/emscripten/emtests}/fnmatch.c (100%) rename {emtests => lib/emscripten/emtests}/fnmatch.out (100%) rename {emtests => lib/emscripten/emtests}/getValue_setValue.cpp (100%) rename {emtests => lib/emscripten/emtests}/getValue_setValue.txt (100%) rename {emtests => lib/emscripten/emtests}/getValue_setValue.wasm (100%) rename {emtests => lib/emscripten/emtests}/getValue_setValue_assert.txt (100%) rename {emtests => lib/emscripten/emtests}/ignores.txt (100%) rename {emtests => lib/emscripten/emtests}/legacy_exported_runtime_numbers.cpp (100%) rename {emtests => lib/emscripten/emtests}/legacy_exported_runtime_numbers.txt (100%) rename {emtests => lib/emscripten/emtests}/legacy_exported_runtime_numbers.wasm (100%) rename {emtests => lib/emscripten/emtests}/legacy_exported_runtime_numbers_assert.txt (100%) rename {emtests => lib/emscripten/emtests}/localtime.c (100%) rename {emtests => lib/emscripten/emtests}/localtime.out (100%) rename {emtests => lib/emscripten/emtests}/localtime.wasm (100%) rename {emtests => lib/emscripten/emtests}/modularize_closure_pre.c (100%) rename {emtests => lib/emscripten/emtests}/modularize_closure_pre.out (100%) rename {emtests => lib/emscripten/emtests}/modularize_closure_pre.wasm (100%) rename {emtests => lib/emscripten/emtests}/printf.c (100%) rename {emtests => lib/emscripten/emtests}/printf.out (100%) rename {emtests => lib/emscripten/emtests}/printf.wasm (100%) rename {emtests => lib/emscripten/emtests}/puts.c (100%) rename {emtests => lib/emscripten/emtests}/puts.out (100%) rename {emtests => lib/emscripten/emtests}/puts.wasm (100%) rename {emtests => lib/emscripten/emtests}/stackAlloc.cpp (100%) rename {emtests => lib/emscripten/emtests}/stackAlloc.txt (100%) rename {emtests => lib/emscripten/emtests}/stackAlloc.wasm (100%) rename {emtests => lib/emscripten/emtests}/stack_overflow.cpp (100%) rename {emtests => lib/emscripten/emtests}/stack_overflow.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_addr_of_stacked.c (100%) rename {emtests => lib/emscripten/emtests}/test_addr_of_stacked.out (100%) rename {emtests => lib/emscripten/emtests}/test_addr_of_stacked.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_alloca.c (100%) rename {emtests => lib/emscripten/emtests}/test_alloca.out (100%) rename {emtests => lib/emscripten/emtests}/test_alloca.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_alloca_stack.c (100%) rename {emtests => lib/emscripten/emtests}/test_alloca_stack.out (100%) rename {emtests => lib/emscripten/emtests}/test_alloca_stack.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_array2.c (100%) rename {emtests => lib/emscripten/emtests}/test_array2.out (100%) rename {emtests => lib/emscripten/emtests}/test_array2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_array2b.c (100%) rename {emtests => lib/emscripten/emtests}/test_array2b.out (100%) rename {emtests => lib/emscripten/emtests}/test_array2b.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_assert.c (100%) rename {emtests => lib/emscripten/emtests}/test_assert.out (100%) rename {emtests => lib/emscripten/emtests}/test_atexit.c (100%) rename {emtests => lib/emscripten/emtests}/test_atexit.out (100%) rename {emtests => lib/emscripten/emtests}/test_atoX.c (100%) rename {emtests => lib/emscripten/emtests}/test_atoX.out (100%) rename {emtests => lib/emscripten/emtests}/test_atoX.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_atomic.c (100%) rename {emtests => lib/emscripten/emtests}/test_atomic.out (100%) rename {emtests => lib/emscripten/emtests}/test_atomic.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_atomic_cxx.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_atomic_cxx.txt (100%) rename {emtests => lib/emscripten/emtests}/test_atomic_cxx.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_bigarray.c (100%) rename {emtests => lib/emscripten/emtests}/test_bigarray.out (100%) rename {emtests => lib/emscripten/emtests}/test_bitfields.c (100%) rename {emtests => lib/emscripten/emtests}/test_bitfields.out (100%) rename {emtests => lib/emscripten/emtests}/test_bsearch.c (100%) rename {emtests => lib/emscripten/emtests}/test_bsearch.out (100%) rename {emtests => lib/emscripten/emtests}/test_bsearch.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_bswap64.c (100%) rename {emtests => lib/emscripten/emtests}/test_bswap64.out (100%) rename {emtests => lib/emscripten/emtests}/test_ccall.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_ccall.out (100%) rename {emtests => lib/emscripten/emtests}/test_ccall.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_class.c (100%) rename {emtests => lib/emscripten/emtests}/test_class.out (100%) rename {emtests => lib/emscripten/emtests}/test_complex.c (100%) rename {emtests => lib/emscripten/emtests}/test_complex.out (100%) rename {emtests => lib/emscripten/emtests}/test_complex.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_constglobalstructs.c (100%) rename {emtests => lib/emscripten/emtests}/test_constglobalstructs.out (100%) rename {emtests => lib/emscripten/emtests}/test_conststructs.c (100%) rename {emtests => lib/emscripten/emtests}/test_conststructs.out (100%) rename {emtests => lib/emscripten/emtests}/test_copyop.c (100%) rename {emtests => lib/emscripten/emtests}/test_copyop.out (100%) rename {emtests => lib/emscripten/emtests}/test_cxx03_do_run.c (100%) rename {emtests => lib/emscripten/emtests}/test_cxx03_do_run.out (100%) rename {emtests => lib/emscripten/emtests}/test_demangle_stacks.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_demangle_stacks.out (100%) rename {emtests => lib/emscripten/emtests}/test_demangle_stacks.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_demangle_stacks_noassert.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_demangle_stacks_noassert.out (100%) rename {emtests => lib/emscripten/emtests}/test_demangle_stacks_noassert.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_direct_string_constant_usage.c (100%) rename {emtests => lib/emscripten/emtests}/test_direct_string_constant_usage.out (100%) rename {emtests => lib/emscripten/emtests}/test_dlfcn_self.c (100%) rename {emtests => lib/emscripten/emtests}/test_dlfcn_self.out (100%) rename {emtests => lib/emscripten/emtests}/test_dlmalloc_partial_2.c (100%) rename {emtests => lib/emscripten/emtests}/test_dlmalloc_partial_2.out (100%) rename {emtests => lib/emscripten/emtests}/test_dlmalloc_partial_2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_double_i64_conversion.c (100%) rename {emtests => lib/emscripten/emtests}/test_double_i64_conversion.out (100%) rename {emtests => lib/emscripten/emtests}/test_double_varargs.c (100%) rename {emtests => lib/emscripten/emtests}/test_double_varargs.out (100%) rename {emtests => lib/emscripten/emtests}/test_double_varargs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_dynamic_cast.c (100%) rename {emtests => lib/emscripten/emtests}/test_dynamic_cast.out (100%) rename {emtests => lib/emscripten/emtests}/test_dynamic_cast_2.c (100%) rename {emtests => lib/emscripten/emtests}/test_dynamic_cast_2.out (100%) rename {emtests => lib/emscripten/emtests}/test_dynamic_cast_b.c (100%) rename {emtests => lib/emscripten/emtests}/test_dynamic_cast_b.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_2.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_2.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_parameter_pack.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_parameter_pack.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_parameter_pack.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_signatures.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_signatures.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_signatures.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_unicode.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_unicode.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_unicode.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_unused_arguments.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_unused_arguments.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_asm_unused_arguments.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_em_js.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_em_js.out (100%) rename {emtests => lib/emscripten/emtests}/test_em_js.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_embind_5.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_embind_5.out (100%) rename {emtests => lib/emscripten/emtests}/test_emmalloc.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_emmalloc.txt (100%) rename {emtests => lib/emscripten/emtests}/test_emptyclass.c (100%) rename {emtests => lib/emscripten/emtests}/test_emptyclass.out (100%) rename {emtests => lib/emscripten/emtests}/test_emscripten_api.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_emscripten_api.out (100%) rename {emtests => lib/emscripten/emtests}/test_emscripten_api.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_emulate_function_pointer_casts.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_emulate_function_pointer_casts.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_erf.c (100%) rename {emtests => lib/emscripten/emtests}/test_erf.out (100%) rename {emtests => lib/emscripten/emtests}/test_erf.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_errar.c (100%) rename {emtests => lib/emscripten/emtests}/test_errar.out (100%) rename {emtests => lib/emscripten/emtests}/test_errar.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_2.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_2.out (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_alias.c (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_alias.out (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_convert.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_convert.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_convert.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_destroy_virtual.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_destroy_virtual.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_destroy_virtual.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_libcxx.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_libcxx.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_libcxx.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multi.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multi.out (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multi.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multiple_inherit.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multiple_inherit.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multiple_inherit.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multiple_inherit_rethrow.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multiple_inherit_rethrow.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_multiple_inherit_rethrow.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_primary.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_primary.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_primary.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_refcount.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_refcount.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_refcount.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_resume.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_resume.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_resume.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_rethrow.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_rethrow.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_rethrow.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_simplify_cfg.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_simplify_cfg.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_simplify_cfg.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_std.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_std.out (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_std.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_typed.c (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_typed.out (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_virtual_inheritance.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_virtual_inheritance.txt (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_virtual_inheritance.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_white_list.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_white_list.out (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_white_list.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_white_list_2.c (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_white_list_2.out (100%) rename {emtests => lib/emscripten/emtests}/test_exceptions_white_list_empty.out (100%) rename {emtests => lib/emscripten/emtests}/test_fakestat.c (100%) rename {emtests => lib/emscripten/emtests}/test_fakestat.out (100%) rename {emtests => lib/emscripten/emtests}/test_fast_math.c (100%) rename {emtests => lib/emscripten/emtests}/test_fast_math.out (100%) rename {emtests => lib/emscripten/emtests}/test_fast_math.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_fcvt.c (100%) rename {emtests => lib/emscripten/emtests}/test_fcvt.out (100%) rename {emtests => lib/emscripten/emtests}/test_flexarray_struct.c (100%) rename {emtests => lib/emscripten/emtests}/test_flexarray_struct.out (100%) rename {emtests => lib/emscripten/emtests}/test_flexarray_struct.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_float32_precise.c (100%) rename {emtests => lib/emscripten/emtests}/test_float32_precise.out (100%) rename {emtests => lib/emscripten/emtests}/test_float32_precise.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_float_builtins.c (100%) rename {emtests => lib/emscripten/emtests}/test_float_builtins.out (100%) rename {emtests => lib/emscripten/emtests}/test_float_builtins.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_floatvars.c (100%) rename {emtests => lib/emscripten/emtests}/test_floatvars.out (100%) rename {emtests => lib/emscripten/emtests}/test_frexp.c (100%) rename {emtests => lib/emscripten/emtests}/test_frexp.out (100%) rename {emtests => lib/emscripten/emtests}/test_frexp.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr.c (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr.out (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr_import_type.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr_import_type.out (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr_namecollide.c (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr_namecollide.out (100%) rename {emtests => lib/emscripten/emtests}/test_funcptr_namecollide.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_funcptrfunc.c (100%) rename {emtests => lib/emscripten/emtests}/test_funcptrfunc.out (100%) rename {emtests => lib/emscripten/emtests}/test_funcptrfunc.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_funcs.c (100%) rename {emtests => lib/emscripten/emtests}/test_funcs.out (100%) rename {emtests => lib/emscripten/emtests}/test_funcs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_functionpointer_libfunc_varargs.c (100%) rename {emtests => lib/emscripten/emtests}/test_functionpointer_libfunc_varargs.out (100%) rename {emtests => lib/emscripten/emtests}/test_functionpointer_libfunc_varargs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_fwrite_0.c (100%) rename {emtests => lib/emscripten/emtests}/test_fwrite_0.out (100%) rename {emtests => lib/emscripten/emtests}/test_fwrite_0.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_getgep.c (100%) rename {emtests => lib/emscripten/emtests}/test_getgep.out (100%) rename {emtests => lib/emscripten/emtests}/test_getgep.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_getloadavg.c (100%) rename {emtests => lib/emscripten/emtests}/test_getloadavg.out (100%) rename {emtests => lib/emscripten/emtests}/test_getloadavg.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_getopt.c (100%) rename {emtests => lib/emscripten/emtests}/test_getopt.out (100%) rename {emtests => lib/emscripten/emtests}/test_getopt.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_getopt_long.c (100%) rename {emtests => lib/emscripten/emtests}/test_getopt_long.out (100%) rename {emtests => lib/emscripten/emtests}/test_getopt_long.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_globaldoubles.c (100%) rename {emtests => lib/emscripten/emtests}/test_globaldoubles.out (100%) rename {emtests => lib/emscripten/emtests}/test_globaldoubles.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_globals.c (100%) rename {emtests => lib/emscripten/emtests}/test_globals.out (100%) rename {emtests => lib/emscripten/emtests}/test_globals.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_gmtime.c (100%) rename {emtests => lib/emscripten/emtests}/test_gmtime.out (100%) rename {emtests => lib/emscripten/emtests}/test_gmtime.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_hello_world.c (100%) rename {emtests => lib/emscripten/emtests}/test_hello_world.out (100%) rename {emtests => lib/emscripten/emtests}/test_hello_world.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i16_emcc_intrinsic.c (100%) rename {emtests => lib/emscripten/emtests}/test_i16_emcc_intrinsic.out (100%) rename {emtests => lib/emscripten/emtests}/test_i16_emcc_intrinsic.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i32_mul_precise.c (100%) rename {emtests => lib/emscripten/emtests}/test_i32_mul_precise.out (100%) rename {emtests => lib/emscripten/emtests}/test_i32_mul_precise.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_2.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_2.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_3.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_3.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_4.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_4.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_4.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_7z.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_7z.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_7z.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_b.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_b.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_cmp.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_cmp.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_cmp2.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_cmp2.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_cmp2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_double.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_double.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_i16.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_i16.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_i16.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_llabs.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_llabs.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_llabs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise_needed.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise_needed.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise_needed.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise_unneeded.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise_unneeded.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_precise_unneeded.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_qdouble.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_qdouble.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_qdouble.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_umul.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_umul.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_umul.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_varargs.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_varargs.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_varargs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_i64_zextneg.c (100%) rename {emtests => lib/emscripten/emtests}/test_i64_zextneg.out (100%) rename {emtests => lib/emscripten/emtests}/test_i64_zextneg.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_if.c (100%) rename {emtests => lib/emscripten/emtests}/test_if.out (100%) rename {emtests => lib/emscripten/emtests}/test_if.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_if_else.c (100%) rename {emtests => lib/emscripten/emtests}/test_if_else.out (100%) rename {emtests => lib/emscripten/emtests}/test_if_else.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_indirectbr.c (100%) rename {emtests => lib/emscripten/emtests}/test_indirectbr.out (100%) rename {emtests => lib/emscripten/emtests}/test_indirectbr.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_indirectbr_many.c (100%) rename {emtests => lib/emscripten/emtests}/test_indirectbr_many.out (100%) rename {emtests => lib/emscripten/emtests}/test_indirectbr_many.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_inherit.c (100%) rename {emtests => lib/emscripten/emtests}/test_inherit.out (100%) rename {emtests => lib/emscripten/emtests}/test_inlinejs.c (100%) rename {emtests => lib/emscripten/emtests}/test_inlinejs.out (100%) rename {emtests => lib/emscripten/emtests}/test_inlinejs2.c (100%) rename {emtests => lib/emscripten/emtests}/test_inlinejs2.out (100%) rename {emtests => lib/emscripten/emtests}/test_inlinejs3.c (100%) rename {emtests => lib/emscripten/emtests}/test_inlinejs3.out (100%) rename {emtests => lib/emscripten/emtests}/test_intentional_fault.c (100%) rename {emtests => lib/emscripten/emtests}/test_intentional_fault.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_intvars.c (100%) rename {emtests => lib/emscripten/emtests}/test_intvars.out (100%) rename {emtests => lib/emscripten/emtests}/test_isdigit_l.c (100%) rename {emtests => lib/emscripten/emtests}/test_isdigit_l.out (100%) rename {emtests => lib/emscripten/emtests}/test_isnan.c (100%) rename {emtests => lib/emscripten/emtests}/test_isnan.out (100%) rename {emtests => lib/emscripten/emtests}/test_isnan.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_istream.c (100%) rename {emtests => lib/emscripten/emtests}/test_istream.out (100%) rename {emtests => lib/emscripten/emtests}/test_iswdigit.c (100%) rename {emtests => lib/emscripten/emtests}/test_iswdigit.out (100%) rename {emtests => lib/emscripten/emtests}/test_libcextra.c (100%) rename {emtests => lib/emscripten/emtests}/test_libcextra.out (100%) rename {emtests => lib/emscripten/emtests}/test_libcextra.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_libgen.c (100%) rename {emtests => lib/emscripten/emtests}/test_libgen.out (100%) rename {emtests => lib/emscripten/emtests}/test_libgen.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_linked_list.c (100%) rename {emtests => lib/emscripten/emtests}/test_linked_list.out (100%) rename {emtests => lib/emscripten/emtests}/test_literal_negative_zero.c (100%) rename {emtests => lib/emscripten/emtests}/test_literal_negative_zero.out (100%) rename {emtests => lib/emscripten/emtests}/test_literal_negative_zero.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_llrint.c (100%) rename {emtests => lib/emscripten/emtests}/test_llrint.out (100%) rename {emtests => lib/emscripten/emtests}/test_llrint.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_fabs.c (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_fabs.out (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_fabs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_intrinsics.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_intrinsics.out (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_intrinsics.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_used.c (100%) rename {emtests => lib/emscripten/emtests}/test_llvm_used.out (100%) rename {emtests => lib/emscripten/emtests}/test_llvmswitch.c (100%) rename {emtests => lib/emscripten/emtests}/test_llvmswitch.out (100%) rename {emtests => lib/emscripten/emtests}/test_llvmswitch.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp2.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp2.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp3.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp3.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp3.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp4.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp4.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp4.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_exc.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_exc.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_exc.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_funcptr.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_funcptr.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_funcptr.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_repeat.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_repeat.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_repeat.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_stacked.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_stacked.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_stacked.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_throw.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_throw.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_throw.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_unwind.c (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_unwind.out (100%) rename {emtests => lib/emscripten/emtests}/test_longjmp_unwind.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_loop.c (100%) rename {emtests => lib/emscripten/emtests}/test_loop.out (100%) rename {emtests => lib/emscripten/emtests}/test_loop.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_lower_intrinsics.c (100%) rename {emtests => lib/emscripten/emtests}/test_lower_intrinsics.out (100%) rename {emtests => lib/emscripten/emtests}/test_lower_intrinsics.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_main_module_static_align.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_main_module_static_align.txt (100%) rename {emtests => lib/emscripten/emtests}/test_main_module_static_align.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_main_thread_async_em_asm.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_main_thread_async_em_asm.out (100%) rename {emtests => lib/emscripten/emtests}/test_main_thread_async_em_asm.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_mainenv.c (100%) rename {emtests => lib/emscripten/emtests}/test_mainenv.out (100%) rename {emtests => lib/emscripten/emtests}/test_mainenv.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_math.c (100%) rename {emtests => lib/emscripten/emtests}/test_math.out (100%) rename {emtests => lib/emscripten/emtests}/test_mathfuncptr.c (100%) rename {emtests => lib/emscripten/emtests}/test_mathfuncptr.out (100%) rename {emtests => lib/emscripten/emtests}/test_mathfuncptr.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy2.c (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy2.out (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy3.c (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy3.out (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy3.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy_memcmp.c (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy_memcmp.out (100%) rename {emtests => lib/emscripten/emtests}/test_memcpy_memcmp.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memmove.c (100%) rename {emtests => lib/emscripten/emtests}/test_memmove.out (100%) rename {emtests => lib/emscripten/emtests}/test_memmove.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memmove2.c (100%) rename {emtests => lib/emscripten/emtests}/test_memmove2.out (100%) rename {emtests => lib/emscripten/emtests}/test_memmove2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memmove3.c (100%) rename {emtests => lib/emscripten/emtests}/test_memmove3.out (100%) rename {emtests => lib/emscripten/emtests}/test_memmove3.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth.c (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_2.c (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_3.c (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_3.txt (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_3.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_wasm_mem_max.c (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_wasm_mem_max.txt (100%) rename {emtests => lib/emscripten/emtests}/test_memorygrowth_wasm_mem_max.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_memset.c (100%) rename {emtests => lib/emscripten/emtests}/test_memset.out (100%) rename {emtests => lib/emscripten/emtests}/test_memset.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_mmap.c (100%) rename {emtests => lib/emscripten/emtests}/test_mmap.out (100%) rename {emtests => lib/emscripten/emtests}/test_mmap.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_mod_globalstruct.c (100%) rename {emtests => lib/emscripten/emtests}/test_mod_globalstruct.out (100%) rename {emtests => lib/emscripten/emtests}/test_negative_zero.c (100%) rename {emtests => lib/emscripten/emtests}/test_negative_zero.out (100%) rename {emtests => lib/emscripten/emtests}/test_negative_zero.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_nested_struct_varargs.c (100%) rename {emtests => lib/emscripten/emtests}/test_nested_struct_varargs.out (100%) rename {emtests => lib/emscripten/emtests}/test_nested_struct_varargs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_nl_types.c (100%) rename {emtests => lib/emscripten/emtests}/test_nl_types.out (100%) rename {emtests => lib/emscripten/emtests}/test_nl_types.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_perrar.c (100%) rename {emtests => lib/emscripten/emtests}/test_perrar.out (100%) rename {emtests => lib/emscripten/emtests}/test_perrar.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_phiundef.c (100%) rename {emtests => lib/emscripten/emtests}/test_phiundef.out (100%) rename {emtests => lib/emscripten/emtests}/test_phiundef.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_poll.c (100%) rename {emtests => lib/emscripten/emtests}/test_poll.out (100%) rename {emtests => lib/emscripten/emtests}/test_poll.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_polymorph.c (100%) rename {emtests => lib/emscripten/emtests}/test_polymorph.out (100%) rename {emtests => lib/emscripten/emtests}/test_posixtime.c (100%) rename {emtests => lib/emscripten/emtests}/test_posixtime.out (100%) rename {emtests => lib/emscripten/emtests}/test_posixtime.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_posixtime_no_monotonic.out (100%) rename {emtests => lib/emscripten/emtests}/test_printf_2.c (100%) rename {emtests => lib/emscripten/emtests}/test_printf_2.out (100%) rename {emtests => lib/emscripten/emtests}/test_printf_2.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_printf_more.c (100%) rename {emtests => lib/emscripten/emtests}/test_printf_more.out (100%) rename {emtests => lib/emscripten/emtests}/test_printf_more.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_ptrtoint.out (100%) rename {emtests => lib/emscripten/emtests}/test_random_device.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_random_device.txt (100%) rename {emtests => lib/emscripten/emtests}/test_regex.c (100%) rename {emtests => lib/emscripten/emtests}/test_regex.out (100%) rename {emtests => lib/emscripten/emtests}/test_regex.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_reinterpreted_ptrs.c (100%) rename {emtests => lib/emscripten/emtests}/test_reinterpreted_ptrs.out (100%) rename {emtests => lib/emscripten/emtests}/test_relocatable_void_function.c (100%) rename {emtests => lib/emscripten/emtests}/test_relocatable_void_function.out (100%) rename {emtests => lib/emscripten/emtests}/test_relocatable_void_function.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_rounding.c (100%) rename {emtests => lib/emscripten/emtests}/test_rounding.out (100%) rename {emtests => lib/emscripten/emtests}/test_rounding.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_runtime_stacksave.c (100%) rename {emtests => lib/emscripten/emtests}/test_runtime_stacksave.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_set_align.c (100%) rename {emtests => lib/emscripten/emtests}/test_set_align.out (100%) rename {emtests => lib/emscripten/emtests}/test_set_align.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_siglongjmp.c (100%) rename {emtests => lib/emscripten/emtests}/test_siglongjmp.out (100%) rename {emtests => lib/emscripten/emtests}/test_siglongjmp.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_simd.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd10.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd10.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd11.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd11.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd12.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd12.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd13.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd13.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd14.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd14.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd15.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd15.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd16.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd16.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd2.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd2.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd3.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd3.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd4.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd4.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd5.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd5.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd6.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd6.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd7.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd7.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd8.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd8.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd9.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd9.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_dyncall.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_simd_dyncall.txt (100%) rename {emtests => lib/emscripten/emtests}/test_simd_float32x4.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_float32x4.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_float64x2.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_float64x2.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_int16x8.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_int16x8.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_int32x4.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_int32x4.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_int8x16.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_int8x16.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_set_epi64x.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_set_epi64x.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_shift_right.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_shift_right.out (100%) rename {emtests => lib/emscripten/emtests}/test_simd_sitofp.c (100%) rename {emtests => lib/emscripten/emtests}/test_simd_sitofp.out (100%) rename {emtests => lib/emscripten/emtests}/test_sintvars.c (100%) rename {emtests => lib/emscripten/emtests}/test_sintvars.out (100%) rename {emtests => lib/emscripten/emtests}/test_sintvars.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sizeof.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_sizeof.out (100%) rename {emtests => lib/emscripten/emtests}/test_sizeof.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_3.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_3.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_3.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_4.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_4.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_4.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_5.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_5.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_5.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_6.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_6.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_6.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_caps.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_caps.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_caps.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_float.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_float.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_float.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_hex.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_hex.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_hex.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_n.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_n.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_n.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_other_whitespace.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_other_whitespace.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_other_whitespace.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_skip.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_skip.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_skip.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_whitespace.c (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_whitespace.out (100%) rename {emtests => lib/emscripten/emtests}/test_sscanf_whitespace.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_stack.c (100%) rename {emtests => lib/emscripten/emtests}/test_stack.out (100%) rename {emtests => lib/emscripten/emtests}/test_stack_align.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_stack_align.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_stack_byval.c (100%) rename {emtests => lib/emscripten/emtests}/test_stack_byval.out (100%) rename {emtests => lib/emscripten/emtests}/test_stack_restore.c (100%) rename {emtests => lib/emscripten/emtests}/test_stack_restore.out (100%) rename {emtests => lib/emscripten/emtests}/test_stack_varargs.c (100%) rename {emtests => lib/emscripten/emtests}/test_stack_varargs.out (100%) rename {emtests => lib/emscripten/emtests}/test_stack_varargs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_stack_void.c (100%) rename {emtests => lib/emscripten/emtests}/test_stack_void.out (100%) rename {emtests => lib/emscripten/emtests}/test_stack_void.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_static_variable.c (100%) rename {emtests => lib/emscripten/emtests}/test_static_variable.out (100%) rename {emtests => lib/emscripten/emtests}/test_statics.c (100%) rename {emtests => lib/emscripten/emtests}/test_statics.out (100%) rename {emtests => lib/emscripten/emtests}/test_statvfs.c (100%) rename {emtests => lib/emscripten/emtests}/test_statvfs.out (100%) rename {emtests => lib/emscripten/emtests}/test_statvfs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_std_cout_new.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_std_cout_new.out (100%) rename {emtests => lib/emscripten/emtests}/test_std_cout_new.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_stdlibs.c (100%) rename {emtests => lib/emscripten/emtests}/test_stdlibs.out (100%) rename {emtests => lib/emscripten/emtests}/test_stdvec.c (100%) rename {emtests => lib/emscripten/emtests}/test_stdvec.out (100%) rename {emtests => lib/emscripten/emtests}/test_strcasecmp.c (100%) rename {emtests => lib/emscripten/emtests}/test_strcasecmp.out (100%) rename {emtests => lib/emscripten/emtests}/test_strcasecmp.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strcmp_uni.c (100%) rename {emtests => lib/emscripten/emtests}/test_strcmp_uni.out (100%) rename {emtests => lib/emscripten/emtests}/test_strcmp_uni.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strftime.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_strftime.out (100%) rename {emtests => lib/emscripten/emtests}/test_strftime.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strings.c (100%) rename {emtests => lib/emscripten/emtests}/test_strings.out (100%) rename {emtests => lib/emscripten/emtests}/test_strings.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strndup.c (100%) rename {emtests => lib/emscripten/emtests}/test_strndup.out (100%) rename {emtests => lib/emscripten/emtests}/test_strndup.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_days.c (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_days.out (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_days.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_reentrant.c (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_reentrant.out (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_reentrant.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_tm.c (100%) rename {emtests => lib/emscripten/emtests}/test_strptime_tm.out (100%) rename {emtests => lib/emscripten/emtests}/test_strstr.c (100%) rename {emtests => lib/emscripten/emtests}/test_strstr.out (100%) rename {emtests => lib/emscripten/emtests}/test_strstr.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtod.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtod.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtod.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtok.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtok.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtok.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_bin.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_bin.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_bin.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_dec.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_dec.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_dec.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_hex.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_hex.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_hex.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_oct.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_oct.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtol_oct.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtold.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtold.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtold.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_bin.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_bin.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_bin.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_dec.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_dec.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_dec.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_hex.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_hex.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_hex.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_oct.c (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_oct.out (100%) rename {emtests => lib/emscripten/emtests}/test_strtoll_oct.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_struct_varargs.c (100%) rename {emtests => lib/emscripten/emtests}/test_struct_varargs.out (100%) rename {emtests => lib/emscripten/emtests}/test_struct_varargs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_structs.c (100%) rename {emtests => lib/emscripten/emtests}/test_structs.out (100%) rename {emtests => lib/emscripten/emtests}/test_time_c.c (100%) rename {emtests => lib/emscripten/emtests}/test_time_c.out (100%) rename {emtests => lib/emscripten/emtests}/test_time_c.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_timeb.c (100%) rename {emtests => lib/emscripten/emtests}/test_timeb.out (100%) rename {emtests => lib/emscripten/emtests}/test_tinyfuncstr.c (100%) rename {emtests => lib/emscripten/emtests}/test_tinyfuncstr.out (100%) rename {emtests => lib/emscripten/emtests}/test_tracing.c (100%) rename {emtests => lib/emscripten/emtests}/test_tracing.out (100%) rename {emtests => lib/emscripten/emtests}/test_tracing.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_transtrcase.c (100%) rename {emtests => lib/emscripten/emtests}/test_transtrcase.out (100%) rename {emtests => lib/emscripten/emtests}/test_transtrcase.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_trickystring.c (100%) rename {emtests => lib/emscripten/emtests}/test_trickystring.out (100%) rename {emtests => lib/emscripten/emtests}/test_trickystring.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_typeid.c (100%) rename {emtests => lib/emscripten/emtests}/test_typeid.out (100%) rename {emtests => lib/emscripten/emtests}/test_uname.c (100%) rename {emtests => lib/emscripten/emtests}/test_uname.out (100%) rename {emtests => lib/emscripten/emtests}/test_uname.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_unary_literal.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_unary_literal.out (100%) rename {emtests => lib/emscripten/emtests}/test_unary_literal.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_utf.c (100%) rename {emtests => lib/emscripten/emtests}/test_utf.out (100%) rename {emtests => lib/emscripten/emtests}/test_utf.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_varargs.c (100%) rename {emtests => lib/emscripten/emtests}/test_varargs.out (100%) rename {emtests => lib/emscripten/emtests}/test_varargs.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_varargs_multi.c (100%) rename {emtests => lib/emscripten/emtests}/test_varargs_multi.out (100%) rename {emtests => lib/emscripten/emtests}/test_varargs_multi.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_vprintf.c (100%) rename {emtests => lib/emscripten/emtests}/test_vprintf.out (100%) rename {emtests => lib/emscripten/emtests}/test_vprintf.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_vsnprintf.c (100%) rename {emtests => lib/emscripten/emtests}/test_vsnprintf.out (100%) rename {emtests => lib/emscripten/emtests}/test_vsnprintf.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_wprintf.cpp (100%) rename {emtests => lib/emscripten/emtests}/test_wprintf.out (100%) rename {emtests => lib/emscripten/emtests}/test_wprintf.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_write_stdout_fileno.c (100%) rename {emtests => lib/emscripten/emtests}/test_write_stdout_fileno.out (100%) rename {emtests => lib/emscripten/emtests}/test_write_stdout_fileno.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_zero_multiplication.c (100%) rename {emtests => lib/emscripten/emtests}/test_zero_multiplication.out (100%) rename {emtests => lib/emscripten/emtests}/test_zero_multiplication.wasm (100%) rename {emtests => lib/emscripten/emtests}/test_zerodiv.c (100%) rename {emtests => lib/emscripten/emtests}/test_zerodiv.out (100%) rename {emtests => lib/emscripten/emtests}/test_zerodiv.wasm (100%) rename {src/apis/emscripten => lib/emscripten/src}/README.md (100%) rename {src/apis/emscripten => lib/emscripten/src}/env.rs (99%) rename {src/apis/emscripten => lib/emscripten/src}/errno.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/exception.rs (93%) rename {src/apis/emscripten => lib/emscripten/src}/io.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/jmp.rs (100%) rename src/apis/emscripten/mod.rs => lib/emscripten/src/lib.rs (99%) rename {src/apis/emscripten => lib/emscripten/src}/linking.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/lock.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/math.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/memory.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/nullfunc.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/process.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/signal.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/storage.rs (100%) rename {src/apis/emscripten => lib/emscripten/src}/syscalls.rs (99%) rename {src/apis/emscripten => lib/emscripten/src}/tests/is_emscripten_false.wast (100%) rename {src/apis/emscripten => lib/emscripten/src}/tests/is_emscripten_true.wast (100%) rename {src/apis/emscripten => lib/emscripten/src}/time.rs (99%) rename {src/apis/emscripten => lib/emscripten/src}/utils.rs (86%) rename {src/apis/emscripten => lib/emscripten/src}/varargs.rs (100%) create mode 100644 lib/emscripten/tests/emtest.rs create mode 100644 lib/emscripten/tests/emtests/_common.rs rename {src => lib/emscripten/tests}/emtests/clock_gettime.rs (100%) rename {src => lib/emscripten/tests}/emtests/emscripten_get_compiler_setting.rs (100%) rename {src => lib/emscripten/tests}/emtests/env.rs (100%) rename {src => lib/emscripten/tests}/emtests/fs_exports.rs (100%) rename {src => lib/emscripten/tests}/emtests/getvalue_setvalue.rs (100%) rename {src => lib/emscripten/tests}/emtests/legacy_exported_runtime_numbers.rs (100%) rename {src => lib/emscripten/tests}/emtests/localtime.rs (100%) rename {src => lib/emscripten/tests}/emtests/mod.rs (100%) rename {src => lib/emscripten/tests}/emtests/modularize_closure_pre.rs (100%) rename {src => lib/emscripten/tests}/emtests/printf.rs (100%) rename {src => lib/emscripten/tests}/emtests/puts.rs (100%) rename {src => lib/emscripten/tests}/emtests/stackalloc.rs (100%) rename {src => lib/emscripten/tests}/emtests/syscalls.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_addr_of_stacked.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_alloca.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_alloca_stack.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_array2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_array2b.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_atomic.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_atox.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_bsearch.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_ccall.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_complex.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_demangle_stacks.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_demangle_stacks_noassert.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_dlmalloc_partial_2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_double_varargs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_em_asm.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_em_asm_2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_em_asm_parameter_pack.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_em_asm_signatures.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_em_asm_unicode.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_em_asm_unused_arguments.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_em_js.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_emscripten_api.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_erf.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_errar.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_exceptions_2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_exceptions_multi.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_exceptions_std.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_exceptions_white_list.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_fast_math.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_flexarray_struct.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_float32_precise.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_float_builtins.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_frexp.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_funcptr.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_funcptr_namecollide.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_funcptrfunc.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_funcs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_functionpointer_libfunc_varargs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_fwrite_0.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_getgep.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_getloadavg.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_getopt.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_getopt_long.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_globaldoubles.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_globals.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_gmtime.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_hello_world.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i16_emcc_intrinsic.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i32_mul_precise.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_4.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_7z.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_cmp2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_i16.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_llabs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_precise.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_precise_needed.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_precise_unneeded.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_qdouble.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_umul.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_varargs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_i64_zextneg.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_if.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_if_else.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_indirectbr.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_indirectbr_many.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_isnan.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_libcextra.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_libgen.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_literal_negative_zero.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_llrint.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_llvm_fabs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_llvm_intrinsics.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_llvmswitch.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp3.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp4.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp_exc.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp_funcptr.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp_repeat.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp_stacked.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp_throw.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_longjmp_unwind.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_loop.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_lower_intrinsics.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_main_thread_async_em_asm.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_mainenv.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_mathfuncptr.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_memcpy2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_memcpy3.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_memcpy_memcmp.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_memmove.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_memmove2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_memmove3.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_memset.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_mmap.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_negative_zero.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_nested_struct_varargs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_nl_types.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_perrar.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_phiundef.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_poll.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_posixtime.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_printf_2.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_printf_more.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_regex.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_relocatable_void_function.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_rounding.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_set_align.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_siglongjmp.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sintvars.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sizeof.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_3.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_4.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_5.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_6.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_caps.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_float.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_hex.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_n.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_other_whitespace.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_skip.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_sscanf_whitespace.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_stack_varargs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_stack_void.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_statvfs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_std_cout_new.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strcasecmp.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strcmp_uni.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strftime.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strings.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strndup.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strptime_days.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strptime_reentrant.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strstr.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtod.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtok.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtol_bin.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtol_dec.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtol_hex.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtol_oct.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtold.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtoll_bin.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtoll_dec.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtoll_hex.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_strtoll_oct.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_struct_varargs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_time_c.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_tracing.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_transtrcase.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_trickystring.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_uname.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_unary_literal.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_utf.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_varargs.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_varargs_multi.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_vprintf.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_vsnprintf.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_wprintf.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_write_stdout_fileno.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_zero_multiplication.rs (100%) rename {src => lib/emscripten/tests}/emtests/test_zerodiv.rs (100%) delete mode 100644 src/apis/host/mod.rs delete mode 100644 src/apis/host/posix/env.rs delete mode 100644 src/apis/host/posix/mod.rs delete mode 100644 src/apis/host/posix/syscalls.rs delete mode 100644 src/apis/mod.rs delete mode 100644 src/emtests/_common.rs diff --git a/Cargo.lock b/Cargo.lock index 49205b5f7..e5559398d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1098,6 +1098,7 @@ dependencies = [ "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-clif-backend 0.1.0", + "wasmer-emscripten 0.1.1", "wasmer-runtime 0.1.0", "wasmparser 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1118,6 +1119,19 @@ dependencies = [ "wasmparser 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "wasmer-emscripten" +version = "0.1.1" +dependencies = [ + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (git+https://github.com/rust-lang/libc)", + "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "wabt 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmer-clif-backend 0.1.0", + "wasmer-runtime 0.1.0", +] + [[package]] name = "wasmer-runtime" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 1c4f31f28..344ffe170 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ repository = "https://github.com/wasmerio/wasmer" publish = true description = "High-Performance WebAssembly JIT interpreter" license = "MIT" -build = "build/mod.rs" include = [ "examples/**/*", "src/**/*", @@ -42,8 +41,6 @@ region = "0.3.0" # spin = "0.4.10" log = "0.4.5" target-lexicon = "0.2.0" -# libc = "0.2" -libc = { git = "https://github.com/rust-lang/libc" } nix = "0.12.0" rayon = "1.0.3" byteorder = "1" @@ -55,9 +52,11 @@ libffi = "0.6.4" time = "0.1.41" wasmer-clif-backend = { path = "lib/clif-backend" } wasmer-runtime = { path = "lib/runtime" } +wasmer-emscripten = { path = "lib/emscripten" } +libc = { git = "https://github.com/rust-lang/libc" } [workspace] -members = ["lib/clif-backend", "lib/runtime"] +members = ["lib/clif-backend", "lib/runtime", "lib/emscripten"] [build-dependencies] wabt = "0.7.2" diff --git a/build/mod.rs b/build/mod.rs deleted file mode 100644 index 2bd41a949..000000000 --- a/build/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -extern crate glob; -extern crate wabt; - -use std::env; - -mod emtests; -mod spectests; - -static SPECTESTS_ENV_VAR: &str = "WASM_GENERATE_SPECTESTS"; -static EMTESTS_ENV_VAR: &str = "WASM_GENERATE_EMTESTS"; - -fn main() { - if env::var(SPECTESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" { - spectests::build(); - } - if env::var(EMTESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" { - emtests::build(); - } -} diff --git a/build/spectests.rs b/build/spectests.rs deleted file mode 100644 index ce1ca3e60..000000000 --- a/build/spectests.rs +++ /dev/null @@ -1,709 +0,0 @@ -//! This file will run at build time to autogenerate Rust tests based on -//! WebAssembly spec tests. It will convert the files indicated in TESTS -//! from "/spectests/{MODULE}.wast" to "/src/spectests/{MODULE}.rs". -use std::collections::HashMap; -use std::fs; -use std::path::PathBuf; -use wabt::script::{Action, Command, CommandKind, ModuleBinary, ScriptParser, Value}; -use wabt::wasm2wat; - -static BANNER: &str = "// Rust test file autogenerated with cargo build (build/spectests.rs). -// Please do NOT modify it by hand, as it will be reseted on next build.\n"; - -const TESTS: [&str; 60] = [ - "spectests/address.wast", - "spectests/align.wast", - "spectests/binary.wast", - "spectests/block.wast", - "spectests/br.wast", - "spectests/br_if.wast", - "spectests/br_table.wast", - "spectests/break_drop.wast", - "spectests/call.wast", - "spectests/call_indirect.wast", - "spectests/comments.wast", - "spectests/const_.wast", - "spectests/conversions.wast", - "spectests/custom.wast", - "spectests/data.wast", - "spectests/elem.wast", - "spectests/endianness.wast", - "spectests/exports.wast", - "spectests/f32_.wast", - "spectests/f32_bitwise.wast", - "spectests/f32_cmp.wast", - "spectests/f64_.wast", - "spectests/f64_bitwise.wast", - "spectests/f64_cmp.wast", - "spectests/fac.wast", - "spectests/float_exprs.wast", - "spectests/float_literals.wast", - "spectests/float_memory.wast", - "spectests/float_misc.wast", - "spectests/forward.wast", - "spectests/func.wast", - "spectests/func_ptrs.wast", - "spectests/get_local.wast", - "spectests/globals.wast", - "spectests/i32_.wast", - "spectests/i64_.wast", - "spectests/if_.wast", - "spectests/int_exprs.wast", - "spectests/int_literals.wast", - "spectests/labels.wast", - "spectests/left_to_right.wast", - "spectests/loop_.wast", - "spectests/memory.wast", - "spectests/memory_grow.wast", - "spectests/memory_redundancy.wast", - "spectests/memory_trap.wast", - "spectests/nop.wast", - "spectests/return_.wast", - "spectests/select.wast", - "spectests/set_local.wast", - "spectests/stack.wast", - "spectests/start.wast", - "spectests/store_retval.wast", - "spectests/switch.wast", - "spectests/tee_local.wast", - "spectests/token.wast", - "spectests/traps.wast", - "spectests/typecheck.wast", - "spectests/types.wast", - "spectests/unwind.wast", -]; - -fn wabt2rust_type(v: &Value) -> String { - match v { - Value::I32(_v) => format!("i32"), - Value::I64(_v) => format!("i64"), - Value::F32(_v) => format!("f32"), - Value::F64(_v) => format!("f64"), - } -} - -fn wabt2rust_type_destructure(v: &Value, placeholder: &str) -> String { - match v { - Value::I32(_v) => format!("Value::I32({})", placeholder), - Value::I64(_v) => format!("Value::I64({})", placeholder), - Value::F32(_v) => format!("Value::F32({})", placeholder), - Value::F64(_v) => format!("Value::F64({})", placeholder), - } -} - -fn is_nan(v: &Value) -> bool { - if let Value::F32(v) = v { - return v.is_nan(); - } else if let Value::F64(v) = v { - return v.is_nan(); - } - return false; -} - -fn wabt2rust_value_bare(v: &Value) -> String { - match v { - Value::I32(v) => format!("{:?} as i32", v), - Value::I64(v) => format!("{:?} as i64", v), - Value::F32(v) => { - if v.is_infinite() { - if v.is_sign_negative() { - "f32::NEG_INFINITY".to_string() - } else { - "f32::INFINITY".to_string() - } - } else if v.is_nan() { - // Support for non-canonical NaNs - format!("f32::from_bits({:?})", v.to_bits()) - } else { - format!("{:?} as f32", v) - } - } - Value::F64(v) => { - if v.is_infinite() { - if v.is_sign_negative() { - "f64::NEG_INFINITY".to_string() - } else { - "f64::INFINITY".to_string() - } - } else if v.is_nan() { - format!("f64::from_bits({:?})", v.to_bits()) - } else { - format!("{:?} as f64", v) - } - } - } -} - -fn wabt2rust_value(v: &Value) -> String { - match v { - Value::I32(v) => format!("Value::I32({:?} as i32)", v), - Value::I64(v) => format!("Value::I64({:?} as i64)", v), - Value::F32(v) => { - if v.is_infinite() { - if v.is_sign_negative() { - "Value::F32(f32::NEG_INFINITY)".to_string() - } else { - "Value::F32(f32::INFINITY)".to_string() - } - } else if v.is_nan() { - // Support for non-canonical NaNs - format!("Value::F32(f32::from_bits({:?}) as u32)", v.to_bits()) - } else { - format!("Value::F32(({:?}f32).to_bits())", v) - } - } - Value::F64(v) => { - if v.is_infinite() { - if v.is_sign_negative() { - "Value::F64(f64::NEG_INFINITY)".to_string() - } else { - "Value::F64(f64::INFINITY)".to_string() - } - } else if v.is_nan() { - format!("Value::F64(f64::from_bits({:?}) as u64)", v.to_bits()) - } else { - format!("Value::F64(({:?}f64).to_bits())", v) - } - } - } -} - -struct WastTestGenerator { - last_module: i32, - last_line: u64, - command_no: i32, - filename: String, - script_parser: ScriptParser, - module_calls: HashMap>, - buffer: String, -} - -impl WastTestGenerator { - fn new(path: &PathBuf) -> Self { - let filename = path.file_name().unwrap().to_str().unwrap(); - let source = fs::read(&path).unwrap(); - let script: ScriptParser = ScriptParser::from_source_and_name(&source, filename).unwrap(); - let buffer = String::new(); - WastTestGenerator { - last_module: 0, - last_line: 0, - command_no: 0, - filename: filename.to_string(), - script_parser: script, - buffer: buffer, - module_calls: HashMap::new(), - } - } - - fn consume(&mut self) { - self.buffer.push_str(BANNER); - self.buffer.push_str(&format!( - "// Test based on spectests/{} -#![allow( - warnings, - dead_code -)] -use wabt::wat2wasm; - -use crate::webassembly::{{instantiate, compile, ResultObject}}; -use wasmer_runtime::types::{{Value}}; - -use super::_common::{{ - spectest_importobject, - NaNCheck, -}};\n\n", - self.filename - )); - while let Some(Command { line, kind }) = &self.script_parser.next().unwrap() { - self.last_line = line.clone(); - self.buffer - .push_str(&format!("\n// Line {}\n", self.last_line)); - self.visit_command(&kind); - self.command_no = self.command_no + 1; - } - for n in 1..self.last_module + 1 { - self.flush_module_calls(n); - } - } - - fn command_name(&self) -> String { - format!("c{}_l{}", self.command_no, self.last_line) - } - - fn flush_module_calls(&mut self, module: i32) { - let calls: Vec = self - .module_calls - .entry(module) - .or_insert(Vec::new()) - .iter() - .map(|call_str| format!("{}(&mut result_object);", call_str)) - .collect(); - if calls.len() > 0 { - self.buffer.push_str( - format!( - "\n#[test] -fn test_module_{}() {{ - let mut result_object = create_module_{}(); - // We group the calls together - {} -}}\n", - module, - module, - calls.join("\n ") - ) - .as_str(), - ); - } - self.module_calls.remove(&module); - } - - fn visit_module(&mut self, module: &ModuleBinary, _name: &Option) { - let wasm_binary: Vec = module.clone().into_vec(); - let wast_string = wasm2wat(wasm_binary).expect("Can't convert back to wasm"); - let last_module = self.last_module; - self.flush_module_calls(last_module); - self.last_module = self.last_module + 1; - // self.module_calls.insert(self.last_module, vec![]); - self.buffer.push_str( - format!( - "fn create_module_{}() -> ResultObject {{ - let module_str = \"{}\"; - let wasm_binary = wat2wasm(module_str.as_bytes()).expect(\"WAST not valid or malformed\"); - instantiate(&wasm_binary[..], &spectest_importobject(), None).expect(\"WASM can't be instantiated\") -}}\n", - self.last_module, - // We do this to ident four spaces, so it looks aligned to the function body - wast_string - .replace("\n", "\n ") - .replace("\\", "\\\\") - .replace("\"", "\\\""), - ) - .as_str(), - ); - - // We set the start call to the module - let start_module_call = format!("start_module_{}", self.last_module); - self.buffer.push_str( - format!( - "\nfn {}(result_object: &mut ResultObject) {{ - // TODO Review is explicit start needed? Start now called in runtime::Instance::new() - //result_object.instance.start(); -}}\n", - start_module_call - ) - .as_str(), - ); - self.module_calls - .entry(self.last_module) - .or_insert(Vec::new()) - .push(start_module_call); - } - - fn visit_assert_invalid(&mut self, module: &ModuleBinary) { - let wasm_binary: Vec = module.clone().into_vec(); - // let wast_string = wasm2wat(wasm_binary).expect("Can't convert back to wasm"); - let command_name = self.command_name(); - self.buffer.push_str( - format!( - "#[test] -fn {}_assert_invalid() {{ - let wasm_binary = {:?}; - let compilation = compile(&wasm_binary.to_vec()); - assert!(compilation.is_err(), \"WASM should not compile as is invalid\"); -}}\n", - command_name, - wasm_binary, - // We do this to ident four spaces back - // String::from_utf8_lossy(&wasm_binary), - // wast_string.replace("\n", "\n "), - ) - .as_str(), - ); - } - - // TODO: Refactor repetitive code - fn visit_assert_return_arithmetic_nan(&mut self, action: &Action) { - match action { - Action::Invoke { - module: _, - field, - args, - } => { - let return_type = wabt2rust_type(&args[0]); - let func_return = format!(" -> {}", return_type); - let assertion = String::from("assert!(result.is_quiet_nan())"); - - // We map the arguments provided into the raw Arguments provided - // to libffi - let mut args_types: Vec = args.iter().map(wabt2rust_type).collect(); - // args_types.push("&Instance".to_string()); - let mut args_values: Vec = args.iter().map(wabt2rust_value).collect(); - // args_values.push("&result_object.instance".to_string()); - let func_name = format!("{}_assert_return_arithmetic_nan", self.command_name()); - self.buffer.push_str( - format!( - "fn {func_name}(result_object: &mut ResultObject) {{ - println!(\"Executing function {{}}\", \"{func_name}\"); - let result = result_object.instance.call(\"{field}\", &[{args_values}]).unwrap().expect(\"Missing result in {func_name}\"); - {assertion} -}}\n", - func_name=func_name, - field=field, - args_values=args_values.join(", "), - assertion=assertion, - ) - .as_str(), - ); - // field=field, - // args_types=args_types.join(", "), - // func_return=func_return, - self.module_calls - .entry(self.last_module) - .or_insert(Vec::new()) - .push(func_name); - // let mut module_calls = self.module_calls.get(&self.last_module).unwrap(); - // module_calls.push(func_name); - } - _ => {} - }; - } - - // PROBLEM: Im assuming the return type from the first argument type - // and wabt does gives us the `expected` result - // TODO: Refactor repetitive code - fn visit_assert_return_canonical_nan(&mut self, action: &Action) { - match action { - Action::Invoke { - module: _, - field, - args, - } => { - let return_type = match &field.as_str() { - &"f64.promote_f32" => String::from("f64"), - &"f32.promote_f64" => String::from("f32"), - _ => wabt2rust_type(&args[0]), - }; - let func_return = format!(" -> {}", return_type); - let assertion = String::from("assert!(result.is_quiet_nan())"); - - // We map the arguments provided into the raw Arguments provided - // to libffi - let mut args_types: Vec = args.iter().map(wabt2rust_type).collect(); - // args_types.push("&Instance".to_string()); - let mut args_values: Vec = args.iter().map(wabt2rust_value).collect(); - // args_values.push("&result_object.instance".to_string()); - let func_name = format!("{}_assert_return_canonical_nan", self.command_name()); - self.buffer.push_str( - format!( - "fn {func_name}(result_object: &mut ResultObject) {{ - println!(\"Executing function {{}}\", \"{func_name}\"); - let result = result_object.instance.call(\"{field}\", &[{args_values}]).unwrap().expect(\"Missing result in {func_name}\"); - {assertion} -}}\n", - func_name=func_name, - field=field, - args_values=args_values.join(", "), - assertion=assertion, - ) - .as_str(), - ); - self.module_calls - .entry(self.last_module) - .or_insert(Vec::new()) - .push(func_name); - // let mut module_calls = self.module_calls.get(&self.last_module).unwrap(); - // module_calls.push(func_name); - } - _ => {} - }; - } - - fn visit_assert_malformed(&mut self, module: &ModuleBinary) { - let wasm_binary: Vec = module.clone().into_vec(); - let command_name = self.command_name(); - // let wast_string = wasm2wat(wasm_binary).expect("Can't convert back to wasm"); - self.buffer.push_str( - format!( - "#[test] -fn {}_assert_malformed() {{ - let wasm_binary = {:?}; - let compilation = compile(&wasm_binary.to_vec()); - assert!(compilation.is_err(), \"WASM should not compile as is malformed\"); -}}\n", - command_name, - wasm_binary, - // We do this to ident four spaces back - // String::from_utf8_lossy(&wasm_binary), - // wast_string.replace("\n", "\n "), - ) - .as_str(), - ); - } - - // TODO: Refactor repetitive code - fn visit_action(&mut self, action: &Action, expected: Option<&Vec>) -> Option { - match action { - Action::Invoke { - module: _, - field, - args, - } => { - let (func_return, assertion) = match expected { - Some(expected) => { - let func_return = if expected.len() > 0 { - format!(" -> {}", wabt2rust_type(&expected[0])) - } else { - "".to_string() - }; - let expected_result = if expected.len() > 0 { - wabt2rust_value_bare(&expected[0]) - } else { - "should not use this expect result".to_string() - }; - let expected_some_result = if expected.len() > 0 { - format!("Some({})", wabt2rust_value(&expected[0])) - } else { - "None".to_string() - }; - let return_type = if expected.len() > 0 { - wabt2rust_type(&expected[0]) - } else { - "should not use this return type".to_string() - }; - let return_type_destructure = if expected.len() > 0 { - wabt2rust_type_destructure(&expected[0], "result") - } else { - "should not use this result return type destructure".to_string() - }; - let expected_type_destructure = if expected.len() > 0 { - wabt2rust_type_destructure(&expected[0], "expected") - } else { - "should not use this expected return type destructure".to_string() - }; - let assertion = if expected.len() > 0 && is_nan(&expected[0]) { - format!( - "let expected = {expected_result}; - if let {return_type_destructure} = result.unwrap() {{ - assert!((result as {return_type}).is_nan()); - assert_eq!((result as {return_type}).is_sign_positive(), (expected as {return_type}).is_sign_positive()); - }} else {{ - panic!(\"Unexpected result type {{:?}}\", result); - }}", - expected_result=expected_result, - return_type=return_type, - return_type_destructure=return_type_destructure - ) - } else { - format!("assert_eq!(result, {});", expected_some_result) - }; - (func_return, assertion) - } - None => ("".to_string(), "".to_string()), - }; - - // We map the arguments provided into the raw Arguments provided - // to libffi - let mut args_types: Vec = args.iter().map(wabt2rust_type).collect(); - // args_types.push("&Instance".to_string()); - let mut args_values: Vec = args.iter().map(wabt2rust_value).collect(); - // args_values.push("&result_object.instance".to_string()); - let func_name = format!("{}_action_invoke", self.command_name()); - self.buffer.push_str( - format!( - "fn {func_name}(result_object: &mut ResultObject) {{ - println!(\"Executing function {{}}\", \"{func_name}\"); - let result = result_object.instance.call(\"{field}\", &[{args_values}]).expect(\"Missing result in {func_name}\"); - {assertion} -}}\n", - func_name=func_name, - field=field, - args_values=args_values.join(", "), - assertion=assertion, - ) - .as_str(), - ); - Some(func_name) - // let mut module_calls = self.module_calls.get(&self.last_module).unwrap(); - // module_calls.push(func_name); - } - _ => None, - } - } - - fn visit_assert_return(&mut self, action: &Action, expected: &Vec) { - let action_fn_name = self.visit_action(action, Some(expected)); - - if action_fn_name.is_none() { - return; - } - self.module_calls - .entry(self.last_module) - .or_insert(Vec::new()) - .push(action_fn_name.unwrap()); - } - - fn visit_perform_action(&mut self, action: &Action) { - let action_fn_name = self.visit_action(action, None); - - if action_fn_name.is_none() { - return; - } - self.module_calls - .entry(self.last_module) - .or_insert(Vec::new()) - .push(action_fn_name.unwrap()); - } - - fn visit_assert_trap(&mut self, action: &Action) { - let action_fn_name = self.visit_action(action, None); - - if action_fn_name.is_none() { - return; - } - let trap_func_name = format!("{}_assert_trap", self.command_name()); - self.buffer.push_str( - format!( - " -#[test] -fn {}() {{ - let mut result_object = create_module_{}(); - let result = call_protected!({}(&mut result_object)); - assert!(result.is_err()); -}}\n", - trap_func_name, - self.last_module, - action_fn_name.unwrap(), - ) - .as_str(), - ); - - // We don't group trap calls as they may cause memory faults - // on the instance memory. So we test them alone. - // self.module_calls - // .entry(self.last_module) - // .or_insert(Vec::new()) - // .push(trap_func_name); - } - - fn visit_command(&mut self, cmd: &CommandKind) { - match cmd { - CommandKind::Module { module, name } => { - self.visit_module(module, name); - } - CommandKind::AssertReturn { action, expected } => { - self.visit_assert_return(action, expected) - } - CommandKind::AssertReturnCanonicalNan { action } => { - self.visit_assert_return_canonical_nan(action); - } - CommandKind::AssertReturnArithmeticNan { action } => { - self.visit_assert_return_arithmetic_nan(action); - } - CommandKind::AssertTrap { action, message: _ } => { - self.visit_assert_trap(action); - } - CommandKind::AssertInvalid { module, message: _ } => { - self.visit_assert_invalid(module); - } - CommandKind::AssertMalformed { module, message: _ } => { - self.visit_assert_malformed(module); - } - CommandKind::AssertUninstantiable { - module: _, - message: _, - } => { - // Do nothing for now - } - CommandKind::AssertExhaustion { action: _ } => { - // Do nothing for now - } - CommandKind::AssertUnlinkable { - module: _, - message: _, - } => { - // Do nothing for now - } - CommandKind::Register { - name: _, - as_name: _, - } => { - // Do nothing for now - } - CommandKind::PerformAction(action) => { - self.visit_perform_action(action); - } - } - } - fn finalize(&self) -> &String { - &self.buffer - } -} - -fn wast_to_rust(wast_filepath: &str) -> (String, i32) { - let wast_filepath = format!("{}/{}", env!("CARGO_MANIFEST_DIR"), wast_filepath); - let path = PathBuf::from(&wast_filepath); - let script_name: String = String::from(path.file_stem().unwrap().to_str().unwrap()); - let rust_test_filepath = format!( - concat!(env!("CARGO_MANIFEST_DIR"), "/src/spectests/{}.rs"), - script_name.clone().as_str() - ); - if script_name == "_common" { - panic!("_common is a reserved name for the _common module. Please use other name for the spectest."); - } - - let wast_modified = fs::metadata(&wast_filepath) - .expect("Can't get wast file metadata") - .modified() - .expect("Can't get wast file modified date"); - let _should_modify = match fs::metadata(&rust_test_filepath) { - Ok(m) => { - m.modified() - .expect("Can't get rust test file modified date") - < wast_modified - } - Err(_) => true, - }; - - // panic!("SOULD MODIFY {:?} {:?}", should_modify, rust_test_filepath); - - // if true { - // should_modify - let mut generator = WastTestGenerator::new(&path); - generator.consume(); - let generated_script = generator.finalize(); - fs::write(&rust_test_filepath, generated_script.as_bytes()).unwrap(); - // } - (script_name, generator.command_no) -} - -pub fn build() { - let rust_test_modpath = concat!(env!("CARGO_MANIFEST_DIR"), "/src/spectests/mod.rs"); - - let mut modules: Vec = Vec::new(); - // modules.reserve_exact(TESTS.len()); - - for test in TESTS.iter() { - let (module_name, number_commands) = wast_to_rust(test); - if number_commands > 200 { - modules.push(format!( - "#[cfg(not(feature = \"fast-tests\"))] -mod {};", - module_name - )); - } else { - modules.push(format!("mod {};", module_name)); - } - } - - modules.insert(0, BANNER.to_string()); - modules.insert(1, "// The _common module is not autogenerated, as it provides common functions for the spectests\nmod _common;".to_string()); - // We add an empty line - modules.push("".to_string()); - - let modfile: String = modules.join("\n"); - let source = fs::read(&rust_test_modpath).unwrap(); - // We only modify the mod file if has changed - if source != modfile.as_bytes() { - fs::write(&rust_test_modpath, modfile.as_bytes()).unwrap(); - } -} diff --git a/lib/clif-backend/Cargo.toml b/lib/clif-backend/Cargo.toml index b92fc2ba3..8f126868b 100644 --- a/lib/clif-backend/Cargo.toml +++ b/lib/clif-backend/Cargo.toml @@ -1,7 +1,11 @@ [package] name = "wasmer-clif-backend" version = "0.1.0" -authors = ["Lachlan Sneff "] +authors = [ + "Lachlan Sneff ", + "Steve Akinyemi ", + "Syrus Akbary " +] edition = "2018" [dependencies] @@ -13,4 +17,4 @@ cranelift-wasm = "0.26.0" hashbrown = "0.1" target-lexicon = "0.2.0" wasmparser = "0.23.0" -byteorder = "1" \ No newline at end of file +byteorder = "1" diff --git a/lib/emscripten/Cargo.toml b/lib/emscripten/Cargo.toml new file mode 100644 index 000000000..982eea73b --- /dev/null +++ b/lib/emscripten/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "wasmer-emscripten" +version = "0.1.1" +authors = [ + "Lachlan Sneff ", + "Steve Akinyemi ", + "Mackenzie Clark ", + "Brandon Fish ", + "Syrus Akbary " +] +edition = "2018" +build = "build/mod.rs" + +[dependencies] +wasmer-runtime = { path = "../runtime" } +libc = { git = "https://github.com/rust-lang/libc" } +byteorder = "1" +time = "0.1.41" + +[dev-dependencies] +wasmer-clif-backend = { path = "../clif-backend" } +wabt = "0.7.2" + +[build-dependencies] +glob = "0.2.11" diff --git a/build/emtests.rs b/lib/emscripten/build/emtests.rs similarity index 98% rename from build/emtests.rs rename to lib/emscripten/build/emtests.rs index cbdafa70d..949aac983 100644 --- a/build/emtests.rs +++ b/lib/emscripten/build/emtests.rs @@ -85,7 +85,7 @@ pub fn compile(file: &str, ignores: &Vec) -> Option { let rs_module_name = module_name.to_lowercase(); let rust_test_filepath = format!( - concat!(env!("CARGO_MANIFEST_DIR"), "/src/emtests/{}.rs"), + concat!(env!("CARGO_MANIFEST_DIR"), "/tests/emtests/{}.rs"), rs_module_name.as_str() ); diff --git a/lib/emscripten/build/mod.rs b/lib/emscripten/build/mod.rs new file mode 100644 index 000000000..81c3fd865 --- /dev/null +++ b/lib/emscripten/build/mod.rs @@ -0,0 +1,11 @@ +use std::env; + +mod emtests; + +static SPECTESTS_ENV_VAR: &str = "WASM_EMSCRIPTEN_GENERATE_EMTESTS"; + +fn main() { + if env::var(SPECTESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" { + emtests::build(); + } +} \ No newline at end of file diff --git a/emtests/FS_exports.cpp b/lib/emscripten/emtests/FS_exports.cpp similarity index 100% rename from emtests/FS_exports.cpp rename to lib/emscripten/emtests/FS_exports.cpp diff --git a/emtests/FS_exports.txt b/lib/emscripten/emtests/FS_exports.txt similarity index 100% rename from emtests/FS_exports.txt rename to lib/emscripten/emtests/FS_exports.txt diff --git a/emtests/FS_exports.wasm b/lib/emscripten/emtests/FS_exports.wasm similarity index 100% rename from emtests/FS_exports.wasm rename to lib/emscripten/emtests/FS_exports.wasm diff --git a/emtests/FS_exports_2.txt b/lib/emscripten/emtests/FS_exports_2.txt similarity index 100% rename from emtests/FS_exports_2.txt rename to lib/emscripten/emtests/FS_exports_2.txt diff --git a/emtests/FS_exports_assert.txt b/lib/emscripten/emtests/FS_exports_assert.txt similarity index 100% rename from emtests/FS_exports_assert.txt rename to lib/emscripten/emtests/FS_exports_assert.txt diff --git a/emtests/FS_exports_assert_2.txt b/lib/emscripten/emtests/FS_exports_assert_2.txt similarity index 100% rename from emtests/FS_exports_assert_2.txt rename to lib/emscripten/emtests/FS_exports_assert_2.txt diff --git a/emtests/README.md b/lib/emscripten/emtests/README.md similarity index 100% rename from emtests/README.md rename to lib/emscripten/emtests/README.md diff --git a/emtests/clock_gettime.c b/lib/emscripten/emtests/clock_gettime.c similarity index 100% rename from emtests/clock_gettime.c rename to lib/emscripten/emtests/clock_gettime.c diff --git a/emtests/clock_gettime.out b/lib/emscripten/emtests/clock_gettime.out similarity index 100% rename from emtests/clock_gettime.out rename to lib/emscripten/emtests/clock_gettime.out diff --git a/emtests/clock_gettime.wasm b/lib/emscripten/emtests/clock_gettime.wasm similarity index 100% rename from emtests/clock_gettime.wasm rename to lib/emscripten/emtests/clock_gettime.wasm diff --git a/emtests/closebitcasts.c b/lib/emscripten/emtests/closebitcasts.c similarity index 100% rename from emtests/closebitcasts.c rename to lib/emscripten/emtests/closebitcasts.c diff --git a/emtests/closebitcasts.txt b/lib/emscripten/emtests/closebitcasts.txt similarity index 100% rename from emtests/closebitcasts.txt rename to lib/emscripten/emtests/closebitcasts.txt diff --git a/emtests/closebitcasts.wasm b/lib/emscripten/emtests/closebitcasts.wasm similarity index 100% rename from emtests/closebitcasts.wasm rename to lib/emscripten/emtests/closebitcasts.wasm diff --git a/emtests/dyncall.c b/lib/emscripten/emtests/dyncall.c similarity index 100% rename from emtests/dyncall.c rename to lib/emscripten/emtests/dyncall.c diff --git a/emtests/dyncall.txt b/lib/emscripten/emtests/dyncall.txt similarity index 100% rename from emtests/dyncall.txt rename to lib/emscripten/emtests/dyncall.txt diff --git a/emtests/dyncall.wasm b/lib/emscripten/emtests/dyncall.wasm similarity index 100% rename from emtests/dyncall.wasm rename to lib/emscripten/emtests/dyncall.wasm diff --git a/emtests/dyncall_specific.c b/lib/emscripten/emtests/dyncall_specific.c similarity index 100% rename from emtests/dyncall_specific.c rename to lib/emscripten/emtests/dyncall_specific.c diff --git a/emtests/dyncall_specific.txt b/lib/emscripten/emtests/dyncall_specific.txt similarity index 100% rename from emtests/dyncall_specific.txt rename to lib/emscripten/emtests/dyncall_specific.txt diff --git a/emtests/dyncall_specific.wasm b/lib/emscripten/emtests/dyncall_specific.wasm similarity index 100% rename from emtests/dyncall_specific.wasm rename to lib/emscripten/emtests/dyncall_specific.wasm diff --git a/emtests/emscripten_get_compiler_setting.c b/lib/emscripten/emtests/emscripten_get_compiler_setting.c similarity index 100% rename from emtests/emscripten_get_compiler_setting.c rename to lib/emscripten/emtests/emscripten_get_compiler_setting.c diff --git a/emtests/emscripten_get_compiler_setting.out b/lib/emscripten/emtests/emscripten_get_compiler_setting.out similarity index 100% rename from emtests/emscripten_get_compiler_setting.out rename to lib/emscripten/emtests/emscripten_get_compiler_setting.out diff --git a/emtests/emscripten_get_compiler_setting.wasm b/lib/emscripten/emtests/emscripten_get_compiler_setting.wasm similarity index 100% rename from emtests/emscripten_get_compiler_setting.wasm rename to lib/emscripten/emtests/emscripten_get_compiler_setting.wasm diff --git a/emtests/env.c b/lib/emscripten/emtests/env.c similarity index 100% rename from emtests/env.c rename to lib/emscripten/emtests/env.c diff --git a/emtests/env.out b/lib/emscripten/emtests/env.out similarity index 100% rename from emtests/env.out rename to lib/emscripten/emtests/env.out diff --git a/emtests/env.wasm b/lib/emscripten/emtests/env.wasm similarity index 100% rename from emtests/env.wasm rename to lib/emscripten/emtests/env.wasm diff --git a/emtests/fnmatch.c b/lib/emscripten/emtests/fnmatch.c similarity index 100% rename from emtests/fnmatch.c rename to lib/emscripten/emtests/fnmatch.c diff --git a/emtests/fnmatch.out b/lib/emscripten/emtests/fnmatch.out similarity index 100% rename from emtests/fnmatch.out rename to lib/emscripten/emtests/fnmatch.out diff --git a/emtests/getValue_setValue.cpp b/lib/emscripten/emtests/getValue_setValue.cpp similarity index 100% rename from emtests/getValue_setValue.cpp rename to lib/emscripten/emtests/getValue_setValue.cpp diff --git a/emtests/getValue_setValue.txt b/lib/emscripten/emtests/getValue_setValue.txt similarity index 100% rename from emtests/getValue_setValue.txt rename to lib/emscripten/emtests/getValue_setValue.txt diff --git a/emtests/getValue_setValue.wasm b/lib/emscripten/emtests/getValue_setValue.wasm similarity index 100% rename from emtests/getValue_setValue.wasm rename to lib/emscripten/emtests/getValue_setValue.wasm diff --git a/emtests/getValue_setValue_assert.txt b/lib/emscripten/emtests/getValue_setValue_assert.txt similarity index 100% rename from emtests/getValue_setValue_assert.txt rename to lib/emscripten/emtests/getValue_setValue_assert.txt diff --git a/emtests/ignores.txt b/lib/emscripten/emtests/ignores.txt similarity index 100% rename from emtests/ignores.txt rename to lib/emscripten/emtests/ignores.txt diff --git a/emtests/legacy_exported_runtime_numbers.cpp b/lib/emscripten/emtests/legacy_exported_runtime_numbers.cpp similarity index 100% rename from emtests/legacy_exported_runtime_numbers.cpp rename to lib/emscripten/emtests/legacy_exported_runtime_numbers.cpp diff --git a/emtests/legacy_exported_runtime_numbers.txt b/lib/emscripten/emtests/legacy_exported_runtime_numbers.txt similarity index 100% rename from emtests/legacy_exported_runtime_numbers.txt rename to lib/emscripten/emtests/legacy_exported_runtime_numbers.txt diff --git a/emtests/legacy_exported_runtime_numbers.wasm b/lib/emscripten/emtests/legacy_exported_runtime_numbers.wasm similarity index 100% rename from emtests/legacy_exported_runtime_numbers.wasm rename to lib/emscripten/emtests/legacy_exported_runtime_numbers.wasm diff --git a/emtests/legacy_exported_runtime_numbers_assert.txt b/lib/emscripten/emtests/legacy_exported_runtime_numbers_assert.txt similarity index 100% rename from emtests/legacy_exported_runtime_numbers_assert.txt rename to lib/emscripten/emtests/legacy_exported_runtime_numbers_assert.txt diff --git a/emtests/localtime.c b/lib/emscripten/emtests/localtime.c similarity index 100% rename from emtests/localtime.c rename to lib/emscripten/emtests/localtime.c diff --git a/emtests/localtime.out b/lib/emscripten/emtests/localtime.out similarity index 100% rename from emtests/localtime.out rename to lib/emscripten/emtests/localtime.out diff --git a/emtests/localtime.wasm b/lib/emscripten/emtests/localtime.wasm similarity index 100% rename from emtests/localtime.wasm rename to lib/emscripten/emtests/localtime.wasm diff --git a/emtests/modularize_closure_pre.c b/lib/emscripten/emtests/modularize_closure_pre.c similarity index 100% rename from emtests/modularize_closure_pre.c rename to lib/emscripten/emtests/modularize_closure_pre.c diff --git a/emtests/modularize_closure_pre.out b/lib/emscripten/emtests/modularize_closure_pre.out similarity index 100% rename from emtests/modularize_closure_pre.out rename to lib/emscripten/emtests/modularize_closure_pre.out diff --git a/emtests/modularize_closure_pre.wasm b/lib/emscripten/emtests/modularize_closure_pre.wasm similarity index 100% rename from emtests/modularize_closure_pre.wasm rename to lib/emscripten/emtests/modularize_closure_pre.wasm diff --git a/emtests/printf.c b/lib/emscripten/emtests/printf.c similarity index 100% rename from emtests/printf.c rename to lib/emscripten/emtests/printf.c diff --git a/emtests/printf.out b/lib/emscripten/emtests/printf.out similarity index 100% rename from emtests/printf.out rename to lib/emscripten/emtests/printf.out diff --git a/emtests/printf.wasm b/lib/emscripten/emtests/printf.wasm similarity index 100% rename from emtests/printf.wasm rename to lib/emscripten/emtests/printf.wasm diff --git a/emtests/puts.c b/lib/emscripten/emtests/puts.c similarity index 100% rename from emtests/puts.c rename to lib/emscripten/emtests/puts.c diff --git a/emtests/puts.out b/lib/emscripten/emtests/puts.out similarity index 100% rename from emtests/puts.out rename to lib/emscripten/emtests/puts.out diff --git a/emtests/puts.wasm b/lib/emscripten/emtests/puts.wasm similarity index 100% rename from emtests/puts.wasm rename to lib/emscripten/emtests/puts.wasm diff --git a/emtests/stackAlloc.cpp b/lib/emscripten/emtests/stackAlloc.cpp similarity index 100% rename from emtests/stackAlloc.cpp rename to lib/emscripten/emtests/stackAlloc.cpp diff --git a/emtests/stackAlloc.txt b/lib/emscripten/emtests/stackAlloc.txt similarity index 100% rename from emtests/stackAlloc.txt rename to lib/emscripten/emtests/stackAlloc.txt diff --git a/emtests/stackAlloc.wasm b/lib/emscripten/emtests/stackAlloc.wasm similarity index 100% rename from emtests/stackAlloc.wasm rename to lib/emscripten/emtests/stackAlloc.wasm diff --git a/emtests/stack_overflow.cpp b/lib/emscripten/emtests/stack_overflow.cpp similarity index 100% rename from emtests/stack_overflow.cpp rename to lib/emscripten/emtests/stack_overflow.cpp diff --git a/emtests/stack_overflow.wasm b/lib/emscripten/emtests/stack_overflow.wasm similarity index 100% rename from emtests/stack_overflow.wasm rename to lib/emscripten/emtests/stack_overflow.wasm diff --git a/emtests/test_addr_of_stacked.c b/lib/emscripten/emtests/test_addr_of_stacked.c similarity index 100% rename from emtests/test_addr_of_stacked.c rename to lib/emscripten/emtests/test_addr_of_stacked.c diff --git a/emtests/test_addr_of_stacked.out b/lib/emscripten/emtests/test_addr_of_stacked.out similarity index 100% rename from emtests/test_addr_of_stacked.out rename to lib/emscripten/emtests/test_addr_of_stacked.out diff --git a/emtests/test_addr_of_stacked.wasm b/lib/emscripten/emtests/test_addr_of_stacked.wasm similarity index 100% rename from emtests/test_addr_of_stacked.wasm rename to lib/emscripten/emtests/test_addr_of_stacked.wasm diff --git a/emtests/test_alloca.c b/lib/emscripten/emtests/test_alloca.c similarity index 100% rename from emtests/test_alloca.c rename to lib/emscripten/emtests/test_alloca.c diff --git a/emtests/test_alloca.out b/lib/emscripten/emtests/test_alloca.out similarity index 100% rename from emtests/test_alloca.out rename to lib/emscripten/emtests/test_alloca.out diff --git a/emtests/test_alloca.wasm b/lib/emscripten/emtests/test_alloca.wasm similarity index 100% rename from emtests/test_alloca.wasm rename to lib/emscripten/emtests/test_alloca.wasm diff --git a/emtests/test_alloca_stack.c b/lib/emscripten/emtests/test_alloca_stack.c similarity index 100% rename from emtests/test_alloca_stack.c rename to lib/emscripten/emtests/test_alloca_stack.c diff --git a/emtests/test_alloca_stack.out b/lib/emscripten/emtests/test_alloca_stack.out similarity index 100% rename from emtests/test_alloca_stack.out rename to lib/emscripten/emtests/test_alloca_stack.out diff --git a/emtests/test_alloca_stack.wasm b/lib/emscripten/emtests/test_alloca_stack.wasm similarity index 100% rename from emtests/test_alloca_stack.wasm rename to lib/emscripten/emtests/test_alloca_stack.wasm diff --git a/emtests/test_array2.c b/lib/emscripten/emtests/test_array2.c similarity index 100% rename from emtests/test_array2.c rename to lib/emscripten/emtests/test_array2.c diff --git a/emtests/test_array2.out b/lib/emscripten/emtests/test_array2.out similarity index 100% rename from emtests/test_array2.out rename to lib/emscripten/emtests/test_array2.out diff --git a/emtests/test_array2.wasm b/lib/emscripten/emtests/test_array2.wasm similarity index 100% rename from emtests/test_array2.wasm rename to lib/emscripten/emtests/test_array2.wasm diff --git a/emtests/test_array2b.c b/lib/emscripten/emtests/test_array2b.c similarity index 100% rename from emtests/test_array2b.c rename to lib/emscripten/emtests/test_array2b.c diff --git a/emtests/test_array2b.out b/lib/emscripten/emtests/test_array2b.out similarity index 100% rename from emtests/test_array2b.out rename to lib/emscripten/emtests/test_array2b.out diff --git a/emtests/test_array2b.wasm b/lib/emscripten/emtests/test_array2b.wasm similarity index 100% rename from emtests/test_array2b.wasm rename to lib/emscripten/emtests/test_array2b.wasm diff --git a/emtests/test_assert.c b/lib/emscripten/emtests/test_assert.c similarity index 100% rename from emtests/test_assert.c rename to lib/emscripten/emtests/test_assert.c diff --git a/emtests/test_assert.out b/lib/emscripten/emtests/test_assert.out similarity index 100% rename from emtests/test_assert.out rename to lib/emscripten/emtests/test_assert.out diff --git a/emtests/test_atexit.c b/lib/emscripten/emtests/test_atexit.c similarity index 100% rename from emtests/test_atexit.c rename to lib/emscripten/emtests/test_atexit.c diff --git a/emtests/test_atexit.out b/lib/emscripten/emtests/test_atexit.out similarity index 100% rename from emtests/test_atexit.out rename to lib/emscripten/emtests/test_atexit.out diff --git a/emtests/test_atoX.c b/lib/emscripten/emtests/test_atoX.c similarity index 100% rename from emtests/test_atoX.c rename to lib/emscripten/emtests/test_atoX.c diff --git a/emtests/test_atoX.out b/lib/emscripten/emtests/test_atoX.out similarity index 100% rename from emtests/test_atoX.out rename to lib/emscripten/emtests/test_atoX.out diff --git a/emtests/test_atoX.wasm b/lib/emscripten/emtests/test_atoX.wasm similarity index 100% rename from emtests/test_atoX.wasm rename to lib/emscripten/emtests/test_atoX.wasm diff --git a/emtests/test_atomic.c b/lib/emscripten/emtests/test_atomic.c similarity index 100% rename from emtests/test_atomic.c rename to lib/emscripten/emtests/test_atomic.c diff --git a/emtests/test_atomic.out b/lib/emscripten/emtests/test_atomic.out similarity index 100% rename from emtests/test_atomic.out rename to lib/emscripten/emtests/test_atomic.out diff --git a/emtests/test_atomic.wasm b/lib/emscripten/emtests/test_atomic.wasm similarity index 100% rename from emtests/test_atomic.wasm rename to lib/emscripten/emtests/test_atomic.wasm diff --git a/emtests/test_atomic_cxx.cpp b/lib/emscripten/emtests/test_atomic_cxx.cpp similarity index 100% rename from emtests/test_atomic_cxx.cpp rename to lib/emscripten/emtests/test_atomic_cxx.cpp diff --git a/emtests/test_atomic_cxx.txt b/lib/emscripten/emtests/test_atomic_cxx.txt similarity index 100% rename from emtests/test_atomic_cxx.txt rename to lib/emscripten/emtests/test_atomic_cxx.txt diff --git a/emtests/test_atomic_cxx.wasm b/lib/emscripten/emtests/test_atomic_cxx.wasm similarity index 100% rename from emtests/test_atomic_cxx.wasm rename to lib/emscripten/emtests/test_atomic_cxx.wasm diff --git a/emtests/test_bigarray.c b/lib/emscripten/emtests/test_bigarray.c similarity index 100% rename from emtests/test_bigarray.c rename to lib/emscripten/emtests/test_bigarray.c diff --git a/emtests/test_bigarray.out b/lib/emscripten/emtests/test_bigarray.out similarity index 100% rename from emtests/test_bigarray.out rename to lib/emscripten/emtests/test_bigarray.out diff --git a/emtests/test_bitfields.c b/lib/emscripten/emtests/test_bitfields.c similarity index 100% rename from emtests/test_bitfields.c rename to lib/emscripten/emtests/test_bitfields.c diff --git a/emtests/test_bitfields.out b/lib/emscripten/emtests/test_bitfields.out similarity index 100% rename from emtests/test_bitfields.out rename to lib/emscripten/emtests/test_bitfields.out diff --git a/emtests/test_bsearch.c b/lib/emscripten/emtests/test_bsearch.c similarity index 100% rename from emtests/test_bsearch.c rename to lib/emscripten/emtests/test_bsearch.c diff --git a/emtests/test_bsearch.out b/lib/emscripten/emtests/test_bsearch.out similarity index 100% rename from emtests/test_bsearch.out rename to lib/emscripten/emtests/test_bsearch.out diff --git a/emtests/test_bsearch.wasm b/lib/emscripten/emtests/test_bsearch.wasm similarity index 100% rename from emtests/test_bsearch.wasm rename to lib/emscripten/emtests/test_bsearch.wasm diff --git a/emtests/test_bswap64.c b/lib/emscripten/emtests/test_bswap64.c similarity index 100% rename from emtests/test_bswap64.c rename to lib/emscripten/emtests/test_bswap64.c diff --git a/emtests/test_bswap64.out b/lib/emscripten/emtests/test_bswap64.out similarity index 100% rename from emtests/test_bswap64.out rename to lib/emscripten/emtests/test_bswap64.out diff --git a/emtests/test_ccall.cpp b/lib/emscripten/emtests/test_ccall.cpp similarity index 100% rename from emtests/test_ccall.cpp rename to lib/emscripten/emtests/test_ccall.cpp diff --git a/emtests/test_ccall.out b/lib/emscripten/emtests/test_ccall.out similarity index 100% rename from emtests/test_ccall.out rename to lib/emscripten/emtests/test_ccall.out diff --git a/emtests/test_ccall.wasm b/lib/emscripten/emtests/test_ccall.wasm similarity index 100% rename from emtests/test_ccall.wasm rename to lib/emscripten/emtests/test_ccall.wasm diff --git a/emtests/test_class.c b/lib/emscripten/emtests/test_class.c similarity index 100% rename from emtests/test_class.c rename to lib/emscripten/emtests/test_class.c diff --git a/emtests/test_class.out b/lib/emscripten/emtests/test_class.out similarity index 100% rename from emtests/test_class.out rename to lib/emscripten/emtests/test_class.out diff --git a/emtests/test_complex.c b/lib/emscripten/emtests/test_complex.c similarity index 100% rename from emtests/test_complex.c rename to lib/emscripten/emtests/test_complex.c diff --git a/emtests/test_complex.out b/lib/emscripten/emtests/test_complex.out similarity index 100% rename from emtests/test_complex.out rename to lib/emscripten/emtests/test_complex.out diff --git a/emtests/test_complex.wasm b/lib/emscripten/emtests/test_complex.wasm similarity index 100% rename from emtests/test_complex.wasm rename to lib/emscripten/emtests/test_complex.wasm diff --git a/emtests/test_constglobalstructs.c b/lib/emscripten/emtests/test_constglobalstructs.c similarity index 100% rename from emtests/test_constglobalstructs.c rename to lib/emscripten/emtests/test_constglobalstructs.c diff --git a/emtests/test_constglobalstructs.out b/lib/emscripten/emtests/test_constglobalstructs.out similarity index 100% rename from emtests/test_constglobalstructs.out rename to lib/emscripten/emtests/test_constglobalstructs.out diff --git a/emtests/test_conststructs.c b/lib/emscripten/emtests/test_conststructs.c similarity index 100% rename from emtests/test_conststructs.c rename to lib/emscripten/emtests/test_conststructs.c diff --git a/emtests/test_conststructs.out b/lib/emscripten/emtests/test_conststructs.out similarity index 100% rename from emtests/test_conststructs.out rename to lib/emscripten/emtests/test_conststructs.out diff --git a/emtests/test_copyop.c b/lib/emscripten/emtests/test_copyop.c similarity index 100% rename from emtests/test_copyop.c rename to lib/emscripten/emtests/test_copyop.c diff --git a/emtests/test_copyop.out b/lib/emscripten/emtests/test_copyop.out similarity index 100% rename from emtests/test_copyop.out rename to lib/emscripten/emtests/test_copyop.out diff --git a/emtests/test_cxx03_do_run.c b/lib/emscripten/emtests/test_cxx03_do_run.c similarity index 100% rename from emtests/test_cxx03_do_run.c rename to lib/emscripten/emtests/test_cxx03_do_run.c diff --git a/emtests/test_cxx03_do_run.out b/lib/emscripten/emtests/test_cxx03_do_run.out similarity index 100% rename from emtests/test_cxx03_do_run.out rename to lib/emscripten/emtests/test_cxx03_do_run.out diff --git a/emtests/test_demangle_stacks.cpp b/lib/emscripten/emtests/test_demangle_stacks.cpp similarity index 100% rename from emtests/test_demangle_stacks.cpp rename to lib/emscripten/emtests/test_demangle_stacks.cpp diff --git a/emtests/test_demangle_stacks.out b/lib/emscripten/emtests/test_demangle_stacks.out similarity index 100% rename from emtests/test_demangle_stacks.out rename to lib/emscripten/emtests/test_demangle_stacks.out diff --git a/emtests/test_demangle_stacks.wasm b/lib/emscripten/emtests/test_demangle_stacks.wasm similarity index 100% rename from emtests/test_demangle_stacks.wasm rename to lib/emscripten/emtests/test_demangle_stacks.wasm diff --git a/emtests/test_demangle_stacks_noassert.cpp b/lib/emscripten/emtests/test_demangle_stacks_noassert.cpp similarity index 100% rename from emtests/test_demangle_stacks_noassert.cpp rename to lib/emscripten/emtests/test_demangle_stacks_noassert.cpp diff --git a/emtests/test_demangle_stacks_noassert.out b/lib/emscripten/emtests/test_demangle_stacks_noassert.out similarity index 100% rename from emtests/test_demangle_stacks_noassert.out rename to lib/emscripten/emtests/test_demangle_stacks_noassert.out diff --git a/emtests/test_demangle_stacks_noassert.wasm b/lib/emscripten/emtests/test_demangle_stacks_noassert.wasm similarity index 100% rename from emtests/test_demangle_stacks_noassert.wasm rename to lib/emscripten/emtests/test_demangle_stacks_noassert.wasm diff --git a/emtests/test_direct_string_constant_usage.c b/lib/emscripten/emtests/test_direct_string_constant_usage.c similarity index 100% rename from emtests/test_direct_string_constant_usage.c rename to lib/emscripten/emtests/test_direct_string_constant_usage.c diff --git a/emtests/test_direct_string_constant_usage.out b/lib/emscripten/emtests/test_direct_string_constant_usage.out similarity index 100% rename from emtests/test_direct_string_constant_usage.out rename to lib/emscripten/emtests/test_direct_string_constant_usage.out diff --git a/emtests/test_dlfcn_self.c b/lib/emscripten/emtests/test_dlfcn_self.c similarity index 100% rename from emtests/test_dlfcn_self.c rename to lib/emscripten/emtests/test_dlfcn_self.c diff --git a/emtests/test_dlfcn_self.out b/lib/emscripten/emtests/test_dlfcn_self.out similarity index 100% rename from emtests/test_dlfcn_self.out rename to lib/emscripten/emtests/test_dlfcn_self.out diff --git a/emtests/test_dlmalloc_partial_2.c b/lib/emscripten/emtests/test_dlmalloc_partial_2.c similarity index 100% rename from emtests/test_dlmalloc_partial_2.c rename to lib/emscripten/emtests/test_dlmalloc_partial_2.c diff --git a/emtests/test_dlmalloc_partial_2.out b/lib/emscripten/emtests/test_dlmalloc_partial_2.out similarity index 100% rename from emtests/test_dlmalloc_partial_2.out rename to lib/emscripten/emtests/test_dlmalloc_partial_2.out diff --git a/emtests/test_dlmalloc_partial_2.wasm b/lib/emscripten/emtests/test_dlmalloc_partial_2.wasm similarity index 100% rename from emtests/test_dlmalloc_partial_2.wasm rename to lib/emscripten/emtests/test_dlmalloc_partial_2.wasm diff --git a/emtests/test_double_i64_conversion.c b/lib/emscripten/emtests/test_double_i64_conversion.c similarity index 100% rename from emtests/test_double_i64_conversion.c rename to lib/emscripten/emtests/test_double_i64_conversion.c diff --git a/emtests/test_double_i64_conversion.out b/lib/emscripten/emtests/test_double_i64_conversion.out similarity index 100% rename from emtests/test_double_i64_conversion.out rename to lib/emscripten/emtests/test_double_i64_conversion.out diff --git a/emtests/test_double_varargs.c b/lib/emscripten/emtests/test_double_varargs.c similarity index 100% rename from emtests/test_double_varargs.c rename to lib/emscripten/emtests/test_double_varargs.c diff --git a/emtests/test_double_varargs.out b/lib/emscripten/emtests/test_double_varargs.out similarity index 100% rename from emtests/test_double_varargs.out rename to lib/emscripten/emtests/test_double_varargs.out diff --git a/emtests/test_double_varargs.wasm b/lib/emscripten/emtests/test_double_varargs.wasm similarity index 100% rename from emtests/test_double_varargs.wasm rename to lib/emscripten/emtests/test_double_varargs.wasm diff --git a/emtests/test_dynamic_cast.c b/lib/emscripten/emtests/test_dynamic_cast.c similarity index 100% rename from emtests/test_dynamic_cast.c rename to lib/emscripten/emtests/test_dynamic_cast.c diff --git a/emtests/test_dynamic_cast.out b/lib/emscripten/emtests/test_dynamic_cast.out similarity index 100% rename from emtests/test_dynamic_cast.out rename to lib/emscripten/emtests/test_dynamic_cast.out diff --git a/emtests/test_dynamic_cast_2.c b/lib/emscripten/emtests/test_dynamic_cast_2.c similarity index 100% rename from emtests/test_dynamic_cast_2.c rename to lib/emscripten/emtests/test_dynamic_cast_2.c diff --git a/emtests/test_dynamic_cast_2.out b/lib/emscripten/emtests/test_dynamic_cast_2.out similarity index 100% rename from emtests/test_dynamic_cast_2.out rename to lib/emscripten/emtests/test_dynamic_cast_2.out diff --git a/emtests/test_dynamic_cast_b.c b/lib/emscripten/emtests/test_dynamic_cast_b.c similarity index 100% rename from emtests/test_dynamic_cast_b.c rename to lib/emscripten/emtests/test_dynamic_cast_b.c diff --git a/emtests/test_dynamic_cast_b.out b/lib/emscripten/emtests/test_dynamic_cast_b.out similarity index 100% rename from emtests/test_dynamic_cast_b.out rename to lib/emscripten/emtests/test_dynamic_cast_b.out diff --git a/emtests/test_em_asm.cpp b/lib/emscripten/emtests/test_em_asm.cpp similarity index 100% rename from emtests/test_em_asm.cpp rename to lib/emscripten/emtests/test_em_asm.cpp diff --git a/emtests/test_em_asm.out b/lib/emscripten/emtests/test_em_asm.out similarity index 100% rename from emtests/test_em_asm.out rename to lib/emscripten/emtests/test_em_asm.out diff --git a/emtests/test_em_asm.wasm b/lib/emscripten/emtests/test_em_asm.wasm similarity index 100% rename from emtests/test_em_asm.wasm rename to lib/emscripten/emtests/test_em_asm.wasm diff --git a/emtests/test_em_asm_2.cpp b/lib/emscripten/emtests/test_em_asm_2.cpp similarity index 100% rename from emtests/test_em_asm_2.cpp rename to lib/emscripten/emtests/test_em_asm_2.cpp diff --git a/emtests/test_em_asm_2.out b/lib/emscripten/emtests/test_em_asm_2.out similarity index 100% rename from emtests/test_em_asm_2.out rename to lib/emscripten/emtests/test_em_asm_2.out diff --git a/emtests/test_em_asm_2.wasm b/lib/emscripten/emtests/test_em_asm_2.wasm similarity index 100% rename from emtests/test_em_asm_2.wasm rename to lib/emscripten/emtests/test_em_asm_2.wasm diff --git a/emtests/test_em_asm_parameter_pack.cpp b/lib/emscripten/emtests/test_em_asm_parameter_pack.cpp similarity index 100% rename from emtests/test_em_asm_parameter_pack.cpp rename to lib/emscripten/emtests/test_em_asm_parameter_pack.cpp diff --git a/emtests/test_em_asm_parameter_pack.out b/lib/emscripten/emtests/test_em_asm_parameter_pack.out similarity index 100% rename from emtests/test_em_asm_parameter_pack.out rename to lib/emscripten/emtests/test_em_asm_parameter_pack.out diff --git a/emtests/test_em_asm_parameter_pack.wasm b/lib/emscripten/emtests/test_em_asm_parameter_pack.wasm similarity index 100% rename from emtests/test_em_asm_parameter_pack.wasm rename to lib/emscripten/emtests/test_em_asm_parameter_pack.wasm diff --git a/emtests/test_em_asm_signatures.cpp b/lib/emscripten/emtests/test_em_asm_signatures.cpp similarity index 100% rename from emtests/test_em_asm_signatures.cpp rename to lib/emscripten/emtests/test_em_asm_signatures.cpp diff --git a/emtests/test_em_asm_signatures.out b/lib/emscripten/emtests/test_em_asm_signatures.out similarity index 100% rename from emtests/test_em_asm_signatures.out rename to lib/emscripten/emtests/test_em_asm_signatures.out diff --git a/emtests/test_em_asm_signatures.wasm b/lib/emscripten/emtests/test_em_asm_signatures.wasm similarity index 100% rename from emtests/test_em_asm_signatures.wasm rename to lib/emscripten/emtests/test_em_asm_signatures.wasm diff --git a/emtests/test_em_asm_unicode.cpp b/lib/emscripten/emtests/test_em_asm_unicode.cpp similarity index 100% rename from emtests/test_em_asm_unicode.cpp rename to lib/emscripten/emtests/test_em_asm_unicode.cpp diff --git a/emtests/test_em_asm_unicode.out b/lib/emscripten/emtests/test_em_asm_unicode.out similarity index 100% rename from emtests/test_em_asm_unicode.out rename to lib/emscripten/emtests/test_em_asm_unicode.out diff --git a/emtests/test_em_asm_unicode.wasm b/lib/emscripten/emtests/test_em_asm_unicode.wasm similarity index 100% rename from emtests/test_em_asm_unicode.wasm rename to lib/emscripten/emtests/test_em_asm_unicode.wasm diff --git a/emtests/test_em_asm_unused_arguments.cpp b/lib/emscripten/emtests/test_em_asm_unused_arguments.cpp similarity index 100% rename from emtests/test_em_asm_unused_arguments.cpp rename to lib/emscripten/emtests/test_em_asm_unused_arguments.cpp diff --git a/emtests/test_em_asm_unused_arguments.out b/lib/emscripten/emtests/test_em_asm_unused_arguments.out similarity index 100% rename from emtests/test_em_asm_unused_arguments.out rename to lib/emscripten/emtests/test_em_asm_unused_arguments.out diff --git a/emtests/test_em_asm_unused_arguments.wasm b/lib/emscripten/emtests/test_em_asm_unused_arguments.wasm similarity index 100% rename from emtests/test_em_asm_unused_arguments.wasm rename to lib/emscripten/emtests/test_em_asm_unused_arguments.wasm diff --git a/emtests/test_em_js.cpp b/lib/emscripten/emtests/test_em_js.cpp similarity index 100% rename from emtests/test_em_js.cpp rename to lib/emscripten/emtests/test_em_js.cpp diff --git a/emtests/test_em_js.out b/lib/emscripten/emtests/test_em_js.out similarity index 100% rename from emtests/test_em_js.out rename to lib/emscripten/emtests/test_em_js.out diff --git a/emtests/test_em_js.wasm b/lib/emscripten/emtests/test_em_js.wasm similarity index 100% rename from emtests/test_em_js.wasm rename to lib/emscripten/emtests/test_em_js.wasm diff --git a/emtests/test_embind_5.cpp b/lib/emscripten/emtests/test_embind_5.cpp similarity index 100% rename from emtests/test_embind_5.cpp rename to lib/emscripten/emtests/test_embind_5.cpp diff --git a/emtests/test_embind_5.out b/lib/emscripten/emtests/test_embind_5.out similarity index 100% rename from emtests/test_embind_5.out rename to lib/emscripten/emtests/test_embind_5.out diff --git a/emtests/test_emmalloc.cpp b/lib/emscripten/emtests/test_emmalloc.cpp similarity index 100% rename from emtests/test_emmalloc.cpp rename to lib/emscripten/emtests/test_emmalloc.cpp diff --git a/emtests/test_emmalloc.txt b/lib/emscripten/emtests/test_emmalloc.txt similarity index 100% rename from emtests/test_emmalloc.txt rename to lib/emscripten/emtests/test_emmalloc.txt diff --git a/emtests/test_emptyclass.c b/lib/emscripten/emtests/test_emptyclass.c similarity index 100% rename from emtests/test_emptyclass.c rename to lib/emscripten/emtests/test_emptyclass.c diff --git a/emtests/test_emptyclass.out b/lib/emscripten/emtests/test_emptyclass.out similarity index 100% rename from emtests/test_emptyclass.out rename to lib/emscripten/emtests/test_emptyclass.out diff --git a/emtests/test_emscripten_api.cpp b/lib/emscripten/emtests/test_emscripten_api.cpp similarity index 100% rename from emtests/test_emscripten_api.cpp rename to lib/emscripten/emtests/test_emscripten_api.cpp diff --git a/emtests/test_emscripten_api.out b/lib/emscripten/emtests/test_emscripten_api.out similarity index 100% rename from emtests/test_emscripten_api.out rename to lib/emscripten/emtests/test_emscripten_api.out diff --git a/emtests/test_emscripten_api.wasm b/lib/emscripten/emtests/test_emscripten_api.wasm similarity index 100% rename from emtests/test_emscripten_api.wasm rename to lib/emscripten/emtests/test_emscripten_api.wasm diff --git a/emtests/test_emulate_function_pointer_casts.cpp b/lib/emscripten/emtests/test_emulate_function_pointer_casts.cpp similarity index 100% rename from emtests/test_emulate_function_pointer_casts.cpp rename to lib/emscripten/emtests/test_emulate_function_pointer_casts.cpp diff --git a/emtests/test_emulate_function_pointer_casts.wasm b/lib/emscripten/emtests/test_emulate_function_pointer_casts.wasm similarity index 100% rename from emtests/test_emulate_function_pointer_casts.wasm rename to lib/emscripten/emtests/test_emulate_function_pointer_casts.wasm diff --git a/emtests/test_erf.c b/lib/emscripten/emtests/test_erf.c similarity index 100% rename from emtests/test_erf.c rename to lib/emscripten/emtests/test_erf.c diff --git a/emtests/test_erf.out b/lib/emscripten/emtests/test_erf.out similarity index 100% rename from emtests/test_erf.out rename to lib/emscripten/emtests/test_erf.out diff --git a/emtests/test_erf.wasm b/lib/emscripten/emtests/test_erf.wasm similarity index 100% rename from emtests/test_erf.wasm rename to lib/emscripten/emtests/test_erf.wasm diff --git a/emtests/test_errar.c b/lib/emscripten/emtests/test_errar.c similarity index 100% rename from emtests/test_errar.c rename to lib/emscripten/emtests/test_errar.c diff --git a/emtests/test_errar.out b/lib/emscripten/emtests/test_errar.out similarity index 100% rename from emtests/test_errar.out rename to lib/emscripten/emtests/test_errar.out diff --git a/emtests/test_errar.wasm b/lib/emscripten/emtests/test_errar.wasm similarity index 100% rename from emtests/test_errar.wasm rename to lib/emscripten/emtests/test_errar.wasm diff --git a/emtests/test_exceptions_2.cpp b/lib/emscripten/emtests/test_exceptions_2.cpp similarity index 100% rename from emtests/test_exceptions_2.cpp rename to lib/emscripten/emtests/test_exceptions_2.cpp diff --git a/emtests/test_exceptions_2.out b/lib/emscripten/emtests/test_exceptions_2.out similarity index 100% rename from emtests/test_exceptions_2.out rename to lib/emscripten/emtests/test_exceptions_2.out diff --git a/emtests/test_exceptions_2.wasm b/lib/emscripten/emtests/test_exceptions_2.wasm similarity index 100% rename from emtests/test_exceptions_2.wasm rename to lib/emscripten/emtests/test_exceptions_2.wasm diff --git a/emtests/test_exceptions_alias.c b/lib/emscripten/emtests/test_exceptions_alias.c similarity index 100% rename from emtests/test_exceptions_alias.c rename to lib/emscripten/emtests/test_exceptions_alias.c diff --git a/emtests/test_exceptions_alias.out b/lib/emscripten/emtests/test_exceptions_alias.out similarity index 100% rename from emtests/test_exceptions_alias.out rename to lib/emscripten/emtests/test_exceptions_alias.out diff --git a/emtests/test_exceptions_convert.cpp b/lib/emscripten/emtests/test_exceptions_convert.cpp similarity index 100% rename from emtests/test_exceptions_convert.cpp rename to lib/emscripten/emtests/test_exceptions_convert.cpp diff --git a/emtests/test_exceptions_convert.txt b/lib/emscripten/emtests/test_exceptions_convert.txt similarity index 100% rename from emtests/test_exceptions_convert.txt rename to lib/emscripten/emtests/test_exceptions_convert.txt diff --git a/emtests/test_exceptions_convert.wasm b/lib/emscripten/emtests/test_exceptions_convert.wasm similarity index 100% rename from emtests/test_exceptions_convert.wasm rename to lib/emscripten/emtests/test_exceptions_convert.wasm diff --git a/emtests/test_exceptions_destroy_virtual.cpp b/lib/emscripten/emtests/test_exceptions_destroy_virtual.cpp similarity index 100% rename from emtests/test_exceptions_destroy_virtual.cpp rename to lib/emscripten/emtests/test_exceptions_destroy_virtual.cpp diff --git a/emtests/test_exceptions_destroy_virtual.txt b/lib/emscripten/emtests/test_exceptions_destroy_virtual.txt similarity index 100% rename from emtests/test_exceptions_destroy_virtual.txt rename to lib/emscripten/emtests/test_exceptions_destroy_virtual.txt diff --git a/emtests/test_exceptions_destroy_virtual.wasm b/lib/emscripten/emtests/test_exceptions_destroy_virtual.wasm similarity index 100% rename from emtests/test_exceptions_destroy_virtual.wasm rename to lib/emscripten/emtests/test_exceptions_destroy_virtual.wasm diff --git a/emtests/test_exceptions_libcxx.cpp b/lib/emscripten/emtests/test_exceptions_libcxx.cpp similarity index 100% rename from emtests/test_exceptions_libcxx.cpp rename to lib/emscripten/emtests/test_exceptions_libcxx.cpp diff --git a/emtests/test_exceptions_libcxx.txt b/lib/emscripten/emtests/test_exceptions_libcxx.txt similarity index 100% rename from emtests/test_exceptions_libcxx.txt rename to lib/emscripten/emtests/test_exceptions_libcxx.txt diff --git a/emtests/test_exceptions_libcxx.wasm b/lib/emscripten/emtests/test_exceptions_libcxx.wasm similarity index 100% rename from emtests/test_exceptions_libcxx.wasm rename to lib/emscripten/emtests/test_exceptions_libcxx.wasm diff --git a/emtests/test_exceptions_multi.cpp b/lib/emscripten/emtests/test_exceptions_multi.cpp similarity index 100% rename from emtests/test_exceptions_multi.cpp rename to lib/emscripten/emtests/test_exceptions_multi.cpp diff --git a/emtests/test_exceptions_multi.out b/lib/emscripten/emtests/test_exceptions_multi.out similarity index 100% rename from emtests/test_exceptions_multi.out rename to lib/emscripten/emtests/test_exceptions_multi.out diff --git a/emtests/test_exceptions_multi.wasm b/lib/emscripten/emtests/test_exceptions_multi.wasm similarity index 100% rename from emtests/test_exceptions_multi.wasm rename to lib/emscripten/emtests/test_exceptions_multi.wasm diff --git a/emtests/test_exceptions_multiple_inherit.cpp b/lib/emscripten/emtests/test_exceptions_multiple_inherit.cpp similarity index 100% rename from emtests/test_exceptions_multiple_inherit.cpp rename to lib/emscripten/emtests/test_exceptions_multiple_inherit.cpp diff --git a/emtests/test_exceptions_multiple_inherit.txt b/lib/emscripten/emtests/test_exceptions_multiple_inherit.txt similarity index 100% rename from emtests/test_exceptions_multiple_inherit.txt rename to lib/emscripten/emtests/test_exceptions_multiple_inherit.txt diff --git a/emtests/test_exceptions_multiple_inherit.wasm b/lib/emscripten/emtests/test_exceptions_multiple_inherit.wasm similarity index 100% rename from emtests/test_exceptions_multiple_inherit.wasm rename to lib/emscripten/emtests/test_exceptions_multiple_inherit.wasm diff --git a/emtests/test_exceptions_multiple_inherit_rethrow.cpp b/lib/emscripten/emtests/test_exceptions_multiple_inherit_rethrow.cpp similarity index 100% rename from emtests/test_exceptions_multiple_inherit_rethrow.cpp rename to lib/emscripten/emtests/test_exceptions_multiple_inherit_rethrow.cpp diff --git a/emtests/test_exceptions_multiple_inherit_rethrow.txt b/lib/emscripten/emtests/test_exceptions_multiple_inherit_rethrow.txt similarity index 100% rename from emtests/test_exceptions_multiple_inherit_rethrow.txt rename to lib/emscripten/emtests/test_exceptions_multiple_inherit_rethrow.txt diff --git a/emtests/test_exceptions_multiple_inherit_rethrow.wasm b/lib/emscripten/emtests/test_exceptions_multiple_inherit_rethrow.wasm similarity index 100% rename from emtests/test_exceptions_multiple_inherit_rethrow.wasm rename to lib/emscripten/emtests/test_exceptions_multiple_inherit_rethrow.wasm diff --git a/emtests/test_exceptions_primary.cpp b/lib/emscripten/emtests/test_exceptions_primary.cpp similarity index 100% rename from emtests/test_exceptions_primary.cpp rename to lib/emscripten/emtests/test_exceptions_primary.cpp diff --git a/emtests/test_exceptions_primary.txt b/lib/emscripten/emtests/test_exceptions_primary.txt similarity index 100% rename from emtests/test_exceptions_primary.txt rename to lib/emscripten/emtests/test_exceptions_primary.txt diff --git a/emtests/test_exceptions_primary.wasm b/lib/emscripten/emtests/test_exceptions_primary.wasm similarity index 100% rename from emtests/test_exceptions_primary.wasm rename to lib/emscripten/emtests/test_exceptions_primary.wasm diff --git a/emtests/test_exceptions_refcount.cpp b/lib/emscripten/emtests/test_exceptions_refcount.cpp similarity index 100% rename from emtests/test_exceptions_refcount.cpp rename to lib/emscripten/emtests/test_exceptions_refcount.cpp diff --git a/emtests/test_exceptions_refcount.txt b/lib/emscripten/emtests/test_exceptions_refcount.txt similarity index 100% rename from emtests/test_exceptions_refcount.txt rename to lib/emscripten/emtests/test_exceptions_refcount.txt diff --git a/emtests/test_exceptions_refcount.wasm b/lib/emscripten/emtests/test_exceptions_refcount.wasm similarity index 100% rename from emtests/test_exceptions_refcount.wasm rename to lib/emscripten/emtests/test_exceptions_refcount.wasm diff --git a/emtests/test_exceptions_resume.cpp b/lib/emscripten/emtests/test_exceptions_resume.cpp similarity index 100% rename from emtests/test_exceptions_resume.cpp rename to lib/emscripten/emtests/test_exceptions_resume.cpp diff --git a/emtests/test_exceptions_resume.txt b/lib/emscripten/emtests/test_exceptions_resume.txt similarity index 100% rename from emtests/test_exceptions_resume.txt rename to lib/emscripten/emtests/test_exceptions_resume.txt diff --git a/emtests/test_exceptions_resume.wasm b/lib/emscripten/emtests/test_exceptions_resume.wasm similarity index 100% rename from emtests/test_exceptions_resume.wasm rename to lib/emscripten/emtests/test_exceptions_resume.wasm diff --git a/emtests/test_exceptions_rethrow.cpp b/lib/emscripten/emtests/test_exceptions_rethrow.cpp similarity index 100% rename from emtests/test_exceptions_rethrow.cpp rename to lib/emscripten/emtests/test_exceptions_rethrow.cpp diff --git a/emtests/test_exceptions_rethrow.txt b/lib/emscripten/emtests/test_exceptions_rethrow.txt similarity index 100% rename from emtests/test_exceptions_rethrow.txt rename to lib/emscripten/emtests/test_exceptions_rethrow.txt diff --git a/emtests/test_exceptions_rethrow.wasm b/lib/emscripten/emtests/test_exceptions_rethrow.wasm similarity index 100% rename from emtests/test_exceptions_rethrow.wasm rename to lib/emscripten/emtests/test_exceptions_rethrow.wasm diff --git a/emtests/test_exceptions_simplify_cfg.cpp b/lib/emscripten/emtests/test_exceptions_simplify_cfg.cpp similarity index 100% rename from emtests/test_exceptions_simplify_cfg.cpp rename to lib/emscripten/emtests/test_exceptions_simplify_cfg.cpp diff --git a/emtests/test_exceptions_simplify_cfg.txt b/lib/emscripten/emtests/test_exceptions_simplify_cfg.txt similarity index 100% rename from emtests/test_exceptions_simplify_cfg.txt rename to lib/emscripten/emtests/test_exceptions_simplify_cfg.txt diff --git a/emtests/test_exceptions_simplify_cfg.wasm b/lib/emscripten/emtests/test_exceptions_simplify_cfg.wasm similarity index 100% rename from emtests/test_exceptions_simplify_cfg.wasm rename to lib/emscripten/emtests/test_exceptions_simplify_cfg.wasm diff --git a/emtests/test_exceptions_std.cpp b/lib/emscripten/emtests/test_exceptions_std.cpp similarity index 100% rename from emtests/test_exceptions_std.cpp rename to lib/emscripten/emtests/test_exceptions_std.cpp diff --git a/emtests/test_exceptions_std.out b/lib/emscripten/emtests/test_exceptions_std.out similarity index 100% rename from emtests/test_exceptions_std.out rename to lib/emscripten/emtests/test_exceptions_std.out diff --git a/emtests/test_exceptions_std.wasm b/lib/emscripten/emtests/test_exceptions_std.wasm similarity index 100% rename from emtests/test_exceptions_std.wasm rename to lib/emscripten/emtests/test_exceptions_std.wasm diff --git a/emtests/test_exceptions_typed.c b/lib/emscripten/emtests/test_exceptions_typed.c similarity index 100% rename from emtests/test_exceptions_typed.c rename to lib/emscripten/emtests/test_exceptions_typed.c diff --git a/emtests/test_exceptions_typed.out b/lib/emscripten/emtests/test_exceptions_typed.out similarity index 100% rename from emtests/test_exceptions_typed.out rename to lib/emscripten/emtests/test_exceptions_typed.out diff --git a/emtests/test_exceptions_virtual_inheritance.cpp b/lib/emscripten/emtests/test_exceptions_virtual_inheritance.cpp similarity index 100% rename from emtests/test_exceptions_virtual_inheritance.cpp rename to lib/emscripten/emtests/test_exceptions_virtual_inheritance.cpp diff --git a/emtests/test_exceptions_virtual_inheritance.txt b/lib/emscripten/emtests/test_exceptions_virtual_inheritance.txt similarity index 100% rename from emtests/test_exceptions_virtual_inheritance.txt rename to lib/emscripten/emtests/test_exceptions_virtual_inheritance.txt diff --git a/emtests/test_exceptions_virtual_inheritance.wasm b/lib/emscripten/emtests/test_exceptions_virtual_inheritance.wasm similarity index 100% rename from emtests/test_exceptions_virtual_inheritance.wasm rename to lib/emscripten/emtests/test_exceptions_virtual_inheritance.wasm diff --git a/emtests/test_exceptions_white_list.cpp b/lib/emscripten/emtests/test_exceptions_white_list.cpp similarity index 100% rename from emtests/test_exceptions_white_list.cpp rename to lib/emscripten/emtests/test_exceptions_white_list.cpp diff --git a/emtests/test_exceptions_white_list.out b/lib/emscripten/emtests/test_exceptions_white_list.out similarity index 100% rename from emtests/test_exceptions_white_list.out rename to lib/emscripten/emtests/test_exceptions_white_list.out diff --git a/emtests/test_exceptions_white_list.wasm b/lib/emscripten/emtests/test_exceptions_white_list.wasm similarity index 100% rename from emtests/test_exceptions_white_list.wasm rename to lib/emscripten/emtests/test_exceptions_white_list.wasm diff --git a/emtests/test_exceptions_white_list_2.c b/lib/emscripten/emtests/test_exceptions_white_list_2.c similarity index 100% rename from emtests/test_exceptions_white_list_2.c rename to lib/emscripten/emtests/test_exceptions_white_list_2.c diff --git a/emtests/test_exceptions_white_list_2.out b/lib/emscripten/emtests/test_exceptions_white_list_2.out similarity index 100% rename from emtests/test_exceptions_white_list_2.out rename to lib/emscripten/emtests/test_exceptions_white_list_2.out diff --git a/emtests/test_exceptions_white_list_empty.out b/lib/emscripten/emtests/test_exceptions_white_list_empty.out similarity index 100% rename from emtests/test_exceptions_white_list_empty.out rename to lib/emscripten/emtests/test_exceptions_white_list_empty.out diff --git a/emtests/test_fakestat.c b/lib/emscripten/emtests/test_fakestat.c similarity index 100% rename from emtests/test_fakestat.c rename to lib/emscripten/emtests/test_fakestat.c diff --git a/emtests/test_fakestat.out b/lib/emscripten/emtests/test_fakestat.out similarity index 100% rename from emtests/test_fakestat.out rename to lib/emscripten/emtests/test_fakestat.out diff --git a/emtests/test_fast_math.c b/lib/emscripten/emtests/test_fast_math.c similarity index 100% rename from emtests/test_fast_math.c rename to lib/emscripten/emtests/test_fast_math.c diff --git a/emtests/test_fast_math.out b/lib/emscripten/emtests/test_fast_math.out similarity index 100% rename from emtests/test_fast_math.out rename to lib/emscripten/emtests/test_fast_math.out diff --git a/emtests/test_fast_math.wasm b/lib/emscripten/emtests/test_fast_math.wasm similarity index 100% rename from emtests/test_fast_math.wasm rename to lib/emscripten/emtests/test_fast_math.wasm diff --git a/emtests/test_fcvt.c b/lib/emscripten/emtests/test_fcvt.c similarity index 100% rename from emtests/test_fcvt.c rename to lib/emscripten/emtests/test_fcvt.c diff --git a/emtests/test_fcvt.out b/lib/emscripten/emtests/test_fcvt.out similarity index 100% rename from emtests/test_fcvt.out rename to lib/emscripten/emtests/test_fcvt.out diff --git a/emtests/test_flexarray_struct.c b/lib/emscripten/emtests/test_flexarray_struct.c similarity index 100% rename from emtests/test_flexarray_struct.c rename to lib/emscripten/emtests/test_flexarray_struct.c diff --git a/emtests/test_flexarray_struct.out b/lib/emscripten/emtests/test_flexarray_struct.out similarity index 100% rename from emtests/test_flexarray_struct.out rename to lib/emscripten/emtests/test_flexarray_struct.out diff --git a/emtests/test_flexarray_struct.wasm b/lib/emscripten/emtests/test_flexarray_struct.wasm similarity index 100% rename from emtests/test_flexarray_struct.wasm rename to lib/emscripten/emtests/test_flexarray_struct.wasm diff --git a/emtests/test_float32_precise.c b/lib/emscripten/emtests/test_float32_precise.c similarity index 100% rename from emtests/test_float32_precise.c rename to lib/emscripten/emtests/test_float32_precise.c diff --git a/emtests/test_float32_precise.out b/lib/emscripten/emtests/test_float32_precise.out similarity index 100% rename from emtests/test_float32_precise.out rename to lib/emscripten/emtests/test_float32_precise.out diff --git a/emtests/test_float32_precise.wasm b/lib/emscripten/emtests/test_float32_precise.wasm similarity index 100% rename from emtests/test_float32_precise.wasm rename to lib/emscripten/emtests/test_float32_precise.wasm diff --git a/emtests/test_float_builtins.c b/lib/emscripten/emtests/test_float_builtins.c similarity index 100% rename from emtests/test_float_builtins.c rename to lib/emscripten/emtests/test_float_builtins.c diff --git a/emtests/test_float_builtins.out b/lib/emscripten/emtests/test_float_builtins.out similarity index 100% rename from emtests/test_float_builtins.out rename to lib/emscripten/emtests/test_float_builtins.out diff --git a/emtests/test_float_builtins.wasm b/lib/emscripten/emtests/test_float_builtins.wasm similarity index 100% rename from emtests/test_float_builtins.wasm rename to lib/emscripten/emtests/test_float_builtins.wasm diff --git a/emtests/test_floatvars.c b/lib/emscripten/emtests/test_floatvars.c similarity index 100% rename from emtests/test_floatvars.c rename to lib/emscripten/emtests/test_floatvars.c diff --git a/emtests/test_floatvars.out b/lib/emscripten/emtests/test_floatvars.out similarity index 100% rename from emtests/test_floatvars.out rename to lib/emscripten/emtests/test_floatvars.out diff --git a/emtests/test_frexp.c b/lib/emscripten/emtests/test_frexp.c similarity index 100% rename from emtests/test_frexp.c rename to lib/emscripten/emtests/test_frexp.c diff --git a/emtests/test_frexp.out b/lib/emscripten/emtests/test_frexp.out similarity index 100% rename from emtests/test_frexp.out rename to lib/emscripten/emtests/test_frexp.out diff --git a/emtests/test_frexp.wasm b/lib/emscripten/emtests/test_frexp.wasm similarity index 100% rename from emtests/test_frexp.wasm rename to lib/emscripten/emtests/test_frexp.wasm diff --git a/emtests/test_funcptr.c b/lib/emscripten/emtests/test_funcptr.c similarity index 100% rename from emtests/test_funcptr.c rename to lib/emscripten/emtests/test_funcptr.c diff --git a/emtests/test_funcptr.out b/lib/emscripten/emtests/test_funcptr.out similarity index 100% rename from emtests/test_funcptr.out rename to lib/emscripten/emtests/test_funcptr.out diff --git a/emtests/test_funcptr.wasm b/lib/emscripten/emtests/test_funcptr.wasm similarity index 100% rename from emtests/test_funcptr.wasm rename to lib/emscripten/emtests/test_funcptr.wasm diff --git a/emtests/test_funcptr_import_type.cpp b/lib/emscripten/emtests/test_funcptr_import_type.cpp similarity index 100% rename from emtests/test_funcptr_import_type.cpp rename to lib/emscripten/emtests/test_funcptr_import_type.cpp diff --git a/emtests/test_funcptr_import_type.out b/lib/emscripten/emtests/test_funcptr_import_type.out similarity index 100% rename from emtests/test_funcptr_import_type.out rename to lib/emscripten/emtests/test_funcptr_import_type.out diff --git a/emtests/test_funcptr_namecollide.c b/lib/emscripten/emtests/test_funcptr_namecollide.c similarity index 100% rename from emtests/test_funcptr_namecollide.c rename to lib/emscripten/emtests/test_funcptr_namecollide.c diff --git a/emtests/test_funcptr_namecollide.out b/lib/emscripten/emtests/test_funcptr_namecollide.out similarity index 100% rename from emtests/test_funcptr_namecollide.out rename to lib/emscripten/emtests/test_funcptr_namecollide.out diff --git a/emtests/test_funcptr_namecollide.wasm b/lib/emscripten/emtests/test_funcptr_namecollide.wasm similarity index 100% rename from emtests/test_funcptr_namecollide.wasm rename to lib/emscripten/emtests/test_funcptr_namecollide.wasm diff --git a/emtests/test_funcptrfunc.c b/lib/emscripten/emtests/test_funcptrfunc.c similarity index 100% rename from emtests/test_funcptrfunc.c rename to lib/emscripten/emtests/test_funcptrfunc.c diff --git a/emtests/test_funcptrfunc.out b/lib/emscripten/emtests/test_funcptrfunc.out similarity index 100% rename from emtests/test_funcptrfunc.out rename to lib/emscripten/emtests/test_funcptrfunc.out diff --git a/emtests/test_funcptrfunc.wasm b/lib/emscripten/emtests/test_funcptrfunc.wasm similarity index 100% rename from emtests/test_funcptrfunc.wasm rename to lib/emscripten/emtests/test_funcptrfunc.wasm diff --git a/emtests/test_funcs.c b/lib/emscripten/emtests/test_funcs.c similarity index 100% rename from emtests/test_funcs.c rename to lib/emscripten/emtests/test_funcs.c diff --git a/emtests/test_funcs.out b/lib/emscripten/emtests/test_funcs.out similarity index 100% rename from emtests/test_funcs.out rename to lib/emscripten/emtests/test_funcs.out diff --git a/emtests/test_funcs.wasm b/lib/emscripten/emtests/test_funcs.wasm similarity index 100% rename from emtests/test_funcs.wasm rename to lib/emscripten/emtests/test_funcs.wasm diff --git a/emtests/test_functionpointer_libfunc_varargs.c b/lib/emscripten/emtests/test_functionpointer_libfunc_varargs.c similarity index 100% rename from emtests/test_functionpointer_libfunc_varargs.c rename to lib/emscripten/emtests/test_functionpointer_libfunc_varargs.c diff --git a/emtests/test_functionpointer_libfunc_varargs.out b/lib/emscripten/emtests/test_functionpointer_libfunc_varargs.out similarity index 100% rename from emtests/test_functionpointer_libfunc_varargs.out rename to lib/emscripten/emtests/test_functionpointer_libfunc_varargs.out diff --git a/emtests/test_functionpointer_libfunc_varargs.wasm b/lib/emscripten/emtests/test_functionpointer_libfunc_varargs.wasm similarity index 100% rename from emtests/test_functionpointer_libfunc_varargs.wasm rename to lib/emscripten/emtests/test_functionpointer_libfunc_varargs.wasm diff --git a/emtests/test_fwrite_0.c b/lib/emscripten/emtests/test_fwrite_0.c similarity index 100% rename from emtests/test_fwrite_0.c rename to lib/emscripten/emtests/test_fwrite_0.c diff --git a/emtests/test_fwrite_0.out b/lib/emscripten/emtests/test_fwrite_0.out similarity index 100% rename from emtests/test_fwrite_0.out rename to lib/emscripten/emtests/test_fwrite_0.out diff --git a/emtests/test_fwrite_0.wasm b/lib/emscripten/emtests/test_fwrite_0.wasm similarity index 100% rename from emtests/test_fwrite_0.wasm rename to lib/emscripten/emtests/test_fwrite_0.wasm diff --git a/emtests/test_getgep.c b/lib/emscripten/emtests/test_getgep.c similarity index 100% rename from emtests/test_getgep.c rename to lib/emscripten/emtests/test_getgep.c diff --git a/emtests/test_getgep.out b/lib/emscripten/emtests/test_getgep.out similarity index 100% rename from emtests/test_getgep.out rename to lib/emscripten/emtests/test_getgep.out diff --git a/emtests/test_getgep.wasm b/lib/emscripten/emtests/test_getgep.wasm similarity index 100% rename from emtests/test_getgep.wasm rename to lib/emscripten/emtests/test_getgep.wasm diff --git a/emtests/test_getloadavg.c b/lib/emscripten/emtests/test_getloadavg.c similarity index 100% rename from emtests/test_getloadavg.c rename to lib/emscripten/emtests/test_getloadavg.c diff --git a/emtests/test_getloadavg.out b/lib/emscripten/emtests/test_getloadavg.out similarity index 100% rename from emtests/test_getloadavg.out rename to lib/emscripten/emtests/test_getloadavg.out diff --git a/emtests/test_getloadavg.wasm b/lib/emscripten/emtests/test_getloadavg.wasm similarity index 100% rename from emtests/test_getloadavg.wasm rename to lib/emscripten/emtests/test_getloadavg.wasm diff --git a/emtests/test_getopt.c b/lib/emscripten/emtests/test_getopt.c similarity index 100% rename from emtests/test_getopt.c rename to lib/emscripten/emtests/test_getopt.c diff --git a/emtests/test_getopt.out b/lib/emscripten/emtests/test_getopt.out similarity index 100% rename from emtests/test_getopt.out rename to lib/emscripten/emtests/test_getopt.out diff --git a/emtests/test_getopt.wasm b/lib/emscripten/emtests/test_getopt.wasm similarity index 100% rename from emtests/test_getopt.wasm rename to lib/emscripten/emtests/test_getopt.wasm diff --git a/emtests/test_getopt_long.c b/lib/emscripten/emtests/test_getopt_long.c similarity index 100% rename from emtests/test_getopt_long.c rename to lib/emscripten/emtests/test_getopt_long.c diff --git a/emtests/test_getopt_long.out b/lib/emscripten/emtests/test_getopt_long.out similarity index 100% rename from emtests/test_getopt_long.out rename to lib/emscripten/emtests/test_getopt_long.out diff --git a/emtests/test_getopt_long.wasm b/lib/emscripten/emtests/test_getopt_long.wasm similarity index 100% rename from emtests/test_getopt_long.wasm rename to lib/emscripten/emtests/test_getopt_long.wasm diff --git a/emtests/test_globaldoubles.c b/lib/emscripten/emtests/test_globaldoubles.c similarity index 100% rename from emtests/test_globaldoubles.c rename to lib/emscripten/emtests/test_globaldoubles.c diff --git a/emtests/test_globaldoubles.out b/lib/emscripten/emtests/test_globaldoubles.out similarity index 100% rename from emtests/test_globaldoubles.out rename to lib/emscripten/emtests/test_globaldoubles.out diff --git a/emtests/test_globaldoubles.wasm b/lib/emscripten/emtests/test_globaldoubles.wasm similarity index 100% rename from emtests/test_globaldoubles.wasm rename to lib/emscripten/emtests/test_globaldoubles.wasm diff --git a/emtests/test_globals.c b/lib/emscripten/emtests/test_globals.c similarity index 100% rename from emtests/test_globals.c rename to lib/emscripten/emtests/test_globals.c diff --git a/emtests/test_globals.out b/lib/emscripten/emtests/test_globals.out similarity index 100% rename from emtests/test_globals.out rename to lib/emscripten/emtests/test_globals.out diff --git a/emtests/test_globals.wasm b/lib/emscripten/emtests/test_globals.wasm similarity index 100% rename from emtests/test_globals.wasm rename to lib/emscripten/emtests/test_globals.wasm diff --git a/emtests/test_gmtime.c b/lib/emscripten/emtests/test_gmtime.c similarity index 100% rename from emtests/test_gmtime.c rename to lib/emscripten/emtests/test_gmtime.c diff --git a/emtests/test_gmtime.out b/lib/emscripten/emtests/test_gmtime.out similarity index 100% rename from emtests/test_gmtime.out rename to lib/emscripten/emtests/test_gmtime.out diff --git a/emtests/test_gmtime.wasm b/lib/emscripten/emtests/test_gmtime.wasm similarity index 100% rename from emtests/test_gmtime.wasm rename to lib/emscripten/emtests/test_gmtime.wasm diff --git a/emtests/test_hello_world.c b/lib/emscripten/emtests/test_hello_world.c similarity index 100% rename from emtests/test_hello_world.c rename to lib/emscripten/emtests/test_hello_world.c diff --git a/emtests/test_hello_world.out b/lib/emscripten/emtests/test_hello_world.out similarity index 100% rename from emtests/test_hello_world.out rename to lib/emscripten/emtests/test_hello_world.out diff --git a/emtests/test_hello_world.wasm b/lib/emscripten/emtests/test_hello_world.wasm similarity index 100% rename from emtests/test_hello_world.wasm rename to lib/emscripten/emtests/test_hello_world.wasm diff --git a/emtests/test_i16_emcc_intrinsic.c b/lib/emscripten/emtests/test_i16_emcc_intrinsic.c similarity index 100% rename from emtests/test_i16_emcc_intrinsic.c rename to lib/emscripten/emtests/test_i16_emcc_intrinsic.c diff --git a/emtests/test_i16_emcc_intrinsic.out b/lib/emscripten/emtests/test_i16_emcc_intrinsic.out similarity index 100% rename from emtests/test_i16_emcc_intrinsic.out rename to lib/emscripten/emtests/test_i16_emcc_intrinsic.out diff --git a/emtests/test_i16_emcc_intrinsic.wasm b/lib/emscripten/emtests/test_i16_emcc_intrinsic.wasm similarity index 100% rename from emtests/test_i16_emcc_intrinsic.wasm rename to lib/emscripten/emtests/test_i16_emcc_intrinsic.wasm diff --git a/emtests/test_i32_mul_precise.c b/lib/emscripten/emtests/test_i32_mul_precise.c similarity index 100% rename from emtests/test_i32_mul_precise.c rename to lib/emscripten/emtests/test_i32_mul_precise.c diff --git a/emtests/test_i32_mul_precise.out b/lib/emscripten/emtests/test_i32_mul_precise.out similarity index 100% rename from emtests/test_i32_mul_precise.out rename to lib/emscripten/emtests/test_i32_mul_precise.out diff --git a/emtests/test_i32_mul_precise.wasm b/lib/emscripten/emtests/test_i32_mul_precise.wasm similarity index 100% rename from emtests/test_i32_mul_precise.wasm rename to lib/emscripten/emtests/test_i32_mul_precise.wasm diff --git a/emtests/test_i64.c b/lib/emscripten/emtests/test_i64.c similarity index 100% rename from emtests/test_i64.c rename to lib/emscripten/emtests/test_i64.c diff --git a/emtests/test_i64.out b/lib/emscripten/emtests/test_i64.out similarity index 100% rename from emtests/test_i64.out rename to lib/emscripten/emtests/test_i64.out diff --git a/emtests/test_i64.wasm b/lib/emscripten/emtests/test_i64.wasm similarity index 100% rename from emtests/test_i64.wasm rename to lib/emscripten/emtests/test_i64.wasm diff --git a/emtests/test_i64_2.c b/lib/emscripten/emtests/test_i64_2.c similarity index 100% rename from emtests/test_i64_2.c rename to lib/emscripten/emtests/test_i64_2.c diff --git a/emtests/test_i64_2.out b/lib/emscripten/emtests/test_i64_2.out similarity index 100% rename from emtests/test_i64_2.out rename to lib/emscripten/emtests/test_i64_2.out diff --git a/emtests/test_i64_3.c b/lib/emscripten/emtests/test_i64_3.c similarity index 100% rename from emtests/test_i64_3.c rename to lib/emscripten/emtests/test_i64_3.c diff --git a/emtests/test_i64_3.out b/lib/emscripten/emtests/test_i64_3.out similarity index 100% rename from emtests/test_i64_3.out rename to lib/emscripten/emtests/test_i64_3.out diff --git a/emtests/test_i64_4.c b/lib/emscripten/emtests/test_i64_4.c similarity index 100% rename from emtests/test_i64_4.c rename to lib/emscripten/emtests/test_i64_4.c diff --git a/emtests/test_i64_4.out b/lib/emscripten/emtests/test_i64_4.out similarity index 100% rename from emtests/test_i64_4.out rename to lib/emscripten/emtests/test_i64_4.out diff --git a/emtests/test_i64_4.wasm b/lib/emscripten/emtests/test_i64_4.wasm similarity index 100% rename from emtests/test_i64_4.wasm rename to lib/emscripten/emtests/test_i64_4.wasm diff --git a/emtests/test_i64_7z.c b/lib/emscripten/emtests/test_i64_7z.c similarity index 100% rename from emtests/test_i64_7z.c rename to lib/emscripten/emtests/test_i64_7z.c diff --git a/emtests/test_i64_7z.out b/lib/emscripten/emtests/test_i64_7z.out similarity index 100% rename from emtests/test_i64_7z.out rename to lib/emscripten/emtests/test_i64_7z.out diff --git a/emtests/test_i64_7z.wasm b/lib/emscripten/emtests/test_i64_7z.wasm similarity index 100% rename from emtests/test_i64_7z.wasm rename to lib/emscripten/emtests/test_i64_7z.wasm diff --git a/emtests/test_i64_b.c b/lib/emscripten/emtests/test_i64_b.c similarity index 100% rename from emtests/test_i64_b.c rename to lib/emscripten/emtests/test_i64_b.c diff --git a/emtests/test_i64_b.out b/lib/emscripten/emtests/test_i64_b.out similarity index 100% rename from emtests/test_i64_b.out rename to lib/emscripten/emtests/test_i64_b.out diff --git a/emtests/test_i64_cmp.c b/lib/emscripten/emtests/test_i64_cmp.c similarity index 100% rename from emtests/test_i64_cmp.c rename to lib/emscripten/emtests/test_i64_cmp.c diff --git a/emtests/test_i64_cmp.out b/lib/emscripten/emtests/test_i64_cmp.out similarity index 100% rename from emtests/test_i64_cmp.out rename to lib/emscripten/emtests/test_i64_cmp.out diff --git a/emtests/test_i64_cmp2.c b/lib/emscripten/emtests/test_i64_cmp2.c similarity index 100% rename from emtests/test_i64_cmp2.c rename to lib/emscripten/emtests/test_i64_cmp2.c diff --git a/emtests/test_i64_cmp2.out b/lib/emscripten/emtests/test_i64_cmp2.out similarity index 100% rename from emtests/test_i64_cmp2.out rename to lib/emscripten/emtests/test_i64_cmp2.out diff --git a/emtests/test_i64_cmp2.wasm b/lib/emscripten/emtests/test_i64_cmp2.wasm similarity index 100% rename from emtests/test_i64_cmp2.wasm rename to lib/emscripten/emtests/test_i64_cmp2.wasm diff --git a/emtests/test_i64_double.c b/lib/emscripten/emtests/test_i64_double.c similarity index 100% rename from emtests/test_i64_double.c rename to lib/emscripten/emtests/test_i64_double.c diff --git a/emtests/test_i64_double.out b/lib/emscripten/emtests/test_i64_double.out similarity index 100% rename from emtests/test_i64_double.out rename to lib/emscripten/emtests/test_i64_double.out diff --git a/emtests/test_i64_i16.c b/lib/emscripten/emtests/test_i64_i16.c similarity index 100% rename from emtests/test_i64_i16.c rename to lib/emscripten/emtests/test_i64_i16.c diff --git a/emtests/test_i64_i16.out b/lib/emscripten/emtests/test_i64_i16.out similarity index 100% rename from emtests/test_i64_i16.out rename to lib/emscripten/emtests/test_i64_i16.out diff --git a/emtests/test_i64_i16.wasm b/lib/emscripten/emtests/test_i64_i16.wasm similarity index 100% rename from emtests/test_i64_i16.wasm rename to lib/emscripten/emtests/test_i64_i16.wasm diff --git a/emtests/test_i64_llabs.c b/lib/emscripten/emtests/test_i64_llabs.c similarity index 100% rename from emtests/test_i64_llabs.c rename to lib/emscripten/emtests/test_i64_llabs.c diff --git a/emtests/test_i64_llabs.out b/lib/emscripten/emtests/test_i64_llabs.out similarity index 100% rename from emtests/test_i64_llabs.out rename to lib/emscripten/emtests/test_i64_llabs.out diff --git a/emtests/test_i64_llabs.wasm b/lib/emscripten/emtests/test_i64_llabs.wasm similarity index 100% rename from emtests/test_i64_llabs.wasm rename to lib/emscripten/emtests/test_i64_llabs.wasm diff --git a/emtests/test_i64_precise.c b/lib/emscripten/emtests/test_i64_precise.c similarity index 100% rename from emtests/test_i64_precise.c rename to lib/emscripten/emtests/test_i64_precise.c diff --git a/emtests/test_i64_precise.out b/lib/emscripten/emtests/test_i64_precise.out similarity index 100% rename from emtests/test_i64_precise.out rename to lib/emscripten/emtests/test_i64_precise.out diff --git a/emtests/test_i64_precise.wasm b/lib/emscripten/emtests/test_i64_precise.wasm similarity index 100% rename from emtests/test_i64_precise.wasm rename to lib/emscripten/emtests/test_i64_precise.wasm diff --git a/emtests/test_i64_precise_needed.c b/lib/emscripten/emtests/test_i64_precise_needed.c similarity index 100% rename from emtests/test_i64_precise_needed.c rename to lib/emscripten/emtests/test_i64_precise_needed.c diff --git a/emtests/test_i64_precise_needed.out b/lib/emscripten/emtests/test_i64_precise_needed.out similarity index 100% rename from emtests/test_i64_precise_needed.out rename to lib/emscripten/emtests/test_i64_precise_needed.out diff --git a/emtests/test_i64_precise_needed.wasm b/lib/emscripten/emtests/test_i64_precise_needed.wasm similarity index 100% rename from emtests/test_i64_precise_needed.wasm rename to lib/emscripten/emtests/test_i64_precise_needed.wasm diff --git a/emtests/test_i64_precise_unneeded.c b/lib/emscripten/emtests/test_i64_precise_unneeded.c similarity index 100% rename from emtests/test_i64_precise_unneeded.c rename to lib/emscripten/emtests/test_i64_precise_unneeded.c diff --git a/emtests/test_i64_precise_unneeded.out b/lib/emscripten/emtests/test_i64_precise_unneeded.out similarity index 100% rename from emtests/test_i64_precise_unneeded.out rename to lib/emscripten/emtests/test_i64_precise_unneeded.out diff --git a/emtests/test_i64_precise_unneeded.wasm b/lib/emscripten/emtests/test_i64_precise_unneeded.wasm similarity index 100% rename from emtests/test_i64_precise_unneeded.wasm rename to lib/emscripten/emtests/test_i64_precise_unneeded.wasm diff --git a/emtests/test_i64_qdouble.c b/lib/emscripten/emtests/test_i64_qdouble.c similarity index 100% rename from emtests/test_i64_qdouble.c rename to lib/emscripten/emtests/test_i64_qdouble.c diff --git a/emtests/test_i64_qdouble.out b/lib/emscripten/emtests/test_i64_qdouble.out similarity index 100% rename from emtests/test_i64_qdouble.out rename to lib/emscripten/emtests/test_i64_qdouble.out diff --git a/emtests/test_i64_qdouble.wasm b/lib/emscripten/emtests/test_i64_qdouble.wasm similarity index 100% rename from emtests/test_i64_qdouble.wasm rename to lib/emscripten/emtests/test_i64_qdouble.wasm diff --git a/emtests/test_i64_umul.c b/lib/emscripten/emtests/test_i64_umul.c similarity index 100% rename from emtests/test_i64_umul.c rename to lib/emscripten/emtests/test_i64_umul.c diff --git a/emtests/test_i64_umul.out b/lib/emscripten/emtests/test_i64_umul.out similarity index 100% rename from emtests/test_i64_umul.out rename to lib/emscripten/emtests/test_i64_umul.out diff --git a/emtests/test_i64_umul.wasm b/lib/emscripten/emtests/test_i64_umul.wasm similarity index 100% rename from emtests/test_i64_umul.wasm rename to lib/emscripten/emtests/test_i64_umul.wasm diff --git a/emtests/test_i64_varargs.c b/lib/emscripten/emtests/test_i64_varargs.c similarity index 100% rename from emtests/test_i64_varargs.c rename to lib/emscripten/emtests/test_i64_varargs.c diff --git a/emtests/test_i64_varargs.out b/lib/emscripten/emtests/test_i64_varargs.out similarity index 100% rename from emtests/test_i64_varargs.out rename to lib/emscripten/emtests/test_i64_varargs.out diff --git a/emtests/test_i64_varargs.wasm b/lib/emscripten/emtests/test_i64_varargs.wasm similarity index 100% rename from emtests/test_i64_varargs.wasm rename to lib/emscripten/emtests/test_i64_varargs.wasm diff --git a/emtests/test_i64_zextneg.c b/lib/emscripten/emtests/test_i64_zextneg.c similarity index 100% rename from emtests/test_i64_zextneg.c rename to lib/emscripten/emtests/test_i64_zextneg.c diff --git a/emtests/test_i64_zextneg.out b/lib/emscripten/emtests/test_i64_zextneg.out similarity index 100% rename from emtests/test_i64_zextneg.out rename to lib/emscripten/emtests/test_i64_zextneg.out diff --git a/emtests/test_i64_zextneg.wasm b/lib/emscripten/emtests/test_i64_zextneg.wasm similarity index 100% rename from emtests/test_i64_zextneg.wasm rename to lib/emscripten/emtests/test_i64_zextneg.wasm diff --git a/emtests/test_if.c b/lib/emscripten/emtests/test_if.c similarity index 100% rename from emtests/test_if.c rename to lib/emscripten/emtests/test_if.c diff --git a/emtests/test_if.out b/lib/emscripten/emtests/test_if.out similarity index 100% rename from emtests/test_if.out rename to lib/emscripten/emtests/test_if.out diff --git a/emtests/test_if.wasm b/lib/emscripten/emtests/test_if.wasm similarity index 100% rename from emtests/test_if.wasm rename to lib/emscripten/emtests/test_if.wasm diff --git a/emtests/test_if_else.c b/lib/emscripten/emtests/test_if_else.c similarity index 100% rename from emtests/test_if_else.c rename to lib/emscripten/emtests/test_if_else.c diff --git a/emtests/test_if_else.out b/lib/emscripten/emtests/test_if_else.out similarity index 100% rename from emtests/test_if_else.out rename to lib/emscripten/emtests/test_if_else.out diff --git a/emtests/test_if_else.wasm b/lib/emscripten/emtests/test_if_else.wasm similarity index 100% rename from emtests/test_if_else.wasm rename to lib/emscripten/emtests/test_if_else.wasm diff --git a/emtests/test_indirectbr.c b/lib/emscripten/emtests/test_indirectbr.c similarity index 100% rename from emtests/test_indirectbr.c rename to lib/emscripten/emtests/test_indirectbr.c diff --git a/emtests/test_indirectbr.out b/lib/emscripten/emtests/test_indirectbr.out similarity index 100% rename from emtests/test_indirectbr.out rename to lib/emscripten/emtests/test_indirectbr.out diff --git a/emtests/test_indirectbr.wasm b/lib/emscripten/emtests/test_indirectbr.wasm similarity index 100% rename from emtests/test_indirectbr.wasm rename to lib/emscripten/emtests/test_indirectbr.wasm diff --git a/emtests/test_indirectbr_many.c b/lib/emscripten/emtests/test_indirectbr_many.c similarity index 100% rename from emtests/test_indirectbr_many.c rename to lib/emscripten/emtests/test_indirectbr_many.c diff --git a/emtests/test_indirectbr_many.out b/lib/emscripten/emtests/test_indirectbr_many.out similarity index 100% rename from emtests/test_indirectbr_many.out rename to lib/emscripten/emtests/test_indirectbr_many.out diff --git a/emtests/test_indirectbr_many.wasm b/lib/emscripten/emtests/test_indirectbr_many.wasm similarity index 100% rename from emtests/test_indirectbr_many.wasm rename to lib/emscripten/emtests/test_indirectbr_many.wasm diff --git a/emtests/test_inherit.c b/lib/emscripten/emtests/test_inherit.c similarity index 100% rename from emtests/test_inherit.c rename to lib/emscripten/emtests/test_inherit.c diff --git a/emtests/test_inherit.out b/lib/emscripten/emtests/test_inherit.out similarity index 100% rename from emtests/test_inherit.out rename to lib/emscripten/emtests/test_inherit.out diff --git a/emtests/test_inlinejs.c b/lib/emscripten/emtests/test_inlinejs.c similarity index 100% rename from emtests/test_inlinejs.c rename to lib/emscripten/emtests/test_inlinejs.c diff --git a/emtests/test_inlinejs.out b/lib/emscripten/emtests/test_inlinejs.out similarity index 100% rename from emtests/test_inlinejs.out rename to lib/emscripten/emtests/test_inlinejs.out diff --git a/emtests/test_inlinejs2.c b/lib/emscripten/emtests/test_inlinejs2.c similarity index 100% rename from emtests/test_inlinejs2.c rename to lib/emscripten/emtests/test_inlinejs2.c diff --git a/emtests/test_inlinejs2.out b/lib/emscripten/emtests/test_inlinejs2.out similarity index 100% rename from emtests/test_inlinejs2.out rename to lib/emscripten/emtests/test_inlinejs2.out diff --git a/emtests/test_inlinejs3.c b/lib/emscripten/emtests/test_inlinejs3.c similarity index 100% rename from emtests/test_inlinejs3.c rename to lib/emscripten/emtests/test_inlinejs3.c diff --git a/emtests/test_inlinejs3.out b/lib/emscripten/emtests/test_inlinejs3.out similarity index 100% rename from emtests/test_inlinejs3.out rename to lib/emscripten/emtests/test_inlinejs3.out diff --git a/emtests/test_intentional_fault.c b/lib/emscripten/emtests/test_intentional_fault.c similarity index 100% rename from emtests/test_intentional_fault.c rename to lib/emscripten/emtests/test_intentional_fault.c diff --git a/emtests/test_intentional_fault.wasm b/lib/emscripten/emtests/test_intentional_fault.wasm similarity index 100% rename from emtests/test_intentional_fault.wasm rename to lib/emscripten/emtests/test_intentional_fault.wasm diff --git a/emtests/test_intvars.c b/lib/emscripten/emtests/test_intvars.c similarity index 100% rename from emtests/test_intvars.c rename to lib/emscripten/emtests/test_intvars.c diff --git a/emtests/test_intvars.out b/lib/emscripten/emtests/test_intvars.out similarity index 100% rename from emtests/test_intvars.out rename to lib/emscripten/emtests/test_intvars.out diff --git a/emtests/test_isdigit_l.c b/lib/emscripten/emtests/test_isdigit_l.c similarity index 100% rename from emtests/test_isdigit_l.c rename to lib/emscripten/emtests/test_isdigit_l.c diff --git a/emtests/test_isdigit_l.out b/lib/emscripten/emtests/test_isdigit_l.out similarity index 100% rename from emtests/test_isdigit_l.out rename to lib/emscripten/emtests/test_isdigit_l.out diff --git a/emtests/test_isnan.c b/lib/emscripten/emtests/test_isnan.c similarity index 100% rename from emtests/test_isnan.c rename to lib/emscripten/emtests/test_isnan.c diff --git a/emtests/test_isnan.out b/lib/emscripten/emtests/test_isnan.out similarity index 100% rename from emtests/test_isnan.out rename to lib/emscripten/emtests/test_isnan.out diff --git a/emtests/test_isnan.wasm b/lib/emscripten/emtests/test_isnan.wasm similarity index 100% rename from emtests/test_isnan.wasm rename to lib/emscripten/emtests/test_isnan.wasm diff --git a/emtests/test_istream.c b/lib/emscripten/emtests/test_istream.c similarity index 100% rename from emtests/test_istream.c rename to lib/emscripten/emtests/test_istream.c diff --git a/emtests/test_istream.out b/lib/emscripten/emtests/test_istream.out similarity index 100% rename from emtests/test_istream.out rename to lib/emscripten/emtests/test_istream.out diff --git a/emtests/test_iswdigit.c b/lib/emscripten/emtests/test_iswdigit.c similarity index 100% rename from emtests/test_iswdigit.c rename to lib/emscripten/emtests/test_iswdigit.c diff --git a/emtests/test_iswdigit.out b/lib/emscripten/emtests/test_iswdigit.out similarity index 100% rename from emtests/test_iswdigit.out rename to lib/emscripten/emtests/test_iswdigit.out diff --git a/emtests/test_libcextra.c b/lib/emscripten/emtests/test_libcextra.c similarity index 100% rename from emtests/test_libcextra.c rename to lib/emscripten/emtests/test_libcextra.c diff --git a/emtests/test_libcextra.out b/lib/emscripten/emtests/test_libcextra.out similarity index 100% rename from emtests/test_libcextra.out rename to lib/emscripten/emtests/test_libcextra.out diff --git a/emtests/test_libcextra.wasm b/lib/emscripten/emtests/test_libcextra.wasm similarity index 100% rename from emtests/test_libcextra.wasm rename to lib/emscripten/emtests/test_libcextra.wasm diff --git a/emtests/test_libgen.c b/lib/emscripten/emtests/test_libgen.c similarity index 100% rename from emtests/test_libgen.c rename to lib/emscripten/emtests/test_libgen.c diff --git a/emtests/test_libgen.out b/lib/emscripten/emtests/test_libgen.out similarity index 100% rename from emtests/test_libgen.out rename to lib/emscripten/emtests/test_libgen.out diff --git a/emtests/test_libgen.wasm b/lib/emscripten/emtests/test_libgen.wasm similarity index 100% rename from emtests/test_libgen.wasm rename to lib/emscripten/emtests/test_libgen.wasm diff --git a/emtests/test_linked_list.c b/lib/emscripten/emtests/test_linked_list.c similarity index 100% rename from emtests/test_linked_list.c rename to lib/emscripten/emtests/test_linked_list.c diff --git a/emtests/test_linked_list.out b/lib/emscripten/emtests/test_linked_list.out similarity index 100% rename from emtests/test_linked_list.out rename to lib/emscripten/emtests/test_linked_list.out diff --git a/emtests/test_literal_negative_zero.c b/lib/emscripten/emtests/test_literal_negative_zero.c similarity index 100% rename from emtests/test_literal_negative_zero.c rename to lib/emscripten/emtests/test_literal_negative_zero.c diff --git a/emtests/test_literal_negative_zero.out b/lib/emscripten/emtests/test_literal_negative_zero.out similarity index 100% rename from emtests/test_literal_negative_zero.out rename to lib/emscripten/emtests/test_literal_negative_zero.out diff --git a/emtests/test_literal_negative_zero.wasm b/lib/emscripten/emtests/test_literal_negative_zero.wasm similarity index 100% rename from emtests/test_literal_negative_zero.wasm rename to lib/emscripten/emtests/test_literal_negative_zero.wasm diff --git a/emtests/test_llrint.c b/lib/emscripten/emtests/test_llrint.c similarity index 100% rename from emtests/test_llrint.c rename to lib/emscripten/emtests/test_llrint.c diff --git a/emtests/test_llrint.out b/lib/emscripten/emtests/test_llrint.out similarity index 100% rename from emtests/test_llrint.out rename to lib/emscripten/emtests/test_llrint.out diff --git a/emtests/test_llrint.wasm b/lib/emscripten/emtests/test_llrint.wasm similarity index 100% rename from emtests/test_llrint.wasm rename to lib/emscripten/emtests/test_llrint.wasm diff --git a/emtests/test_llvm_fabs.c b/lib/emscripten/emtests/test_llvm_fabs.c similarity index 100% rename from emtests/test_llvm_fabs.c rename to lib/emscripten/emtests/test_llvm_fabs.c diff --git a/emtests/test_llvm_fabs.out b/lib/emscripten/emtests/test_llvm_fabs.out similarity index 100% rename from emtests/test_llvm_fabs.out rename to lib/emscripten/emtests/test_llvm_fabs.out diff --git a/emtests/test_llvm_fabs.wasm b/lib/emscripten/emtests/test_llvm_fabs.wasm similarity index 100% rename from emtests/test_llvm_fabs.wasm rename to lib/emscripten/emtests/test_llvm_fabs.wasm diff --git a/emtests/test_llvm_intrinsics.cpp b/lib/emscripten/emtests/test_llvm_intrinsics.cpp similarity index 100% rename from emtests/test_llvm_intrinsics.cpp rename to lib/emscripten/emtests/test_llvm_intrinsics.cpp diff --git a/emtests/test_llvm_intrinsics.out b/lib/emscripten/emtests/test_llvm_intrinsics.out similarity index 100% rename from emtests/test_llvm_intrinsics.out rename to lib/emscripten/emtests/test_llvm_intrinsics.out diff --git a/emtests/test_llvm_intrinsics.wasm b/lib/emscripten/emtests/test_llvm_intrinsics.wasm similarity index 100% rename from emtests/test_llvm_intrinsics.wasm rename to lib/emscripten/emtests/test_llvm_intrinsics.wasm diff --git a/emtests/test_llvm_used.c b/lib/emscripten/emtests/test_llvm_used.c similarity index 100% rename from emtests/test_llvm_used.c rename to lib/emscripten/emtests/test_llvm_used.c diff --git a/emtests/test_llvm_used.out b/lib/emscripten/emtests/test_llvm_used.out similarity index 100% rename from emtests/test_llvm_used.out rename to lib/emscripten/emtests/test_llvm_used.out diff --git a/emtests/test_llvmswitch.c b/lib/emscripten/emtests/test_llvmswitch.c similarity index 100% rename from emtests/test_llvmswitch.c rename to lib/emscripten/emtests/test_llvmswitch.c diff --git a/emtests/test_llvmswitch.out b/lib/emscripten/emtests/test_llvmswitch.out similarity index 100% rename from emtests/test_llvmswitch.out rename to lib/emscripten/emtests/test_llvmswitch.out diff --git a/emtests/test_llvmswitch.wasm b/lib/emscripten/emtests/test_llvmswitch.wasm similarity index 100% rename from emtests/test_llvmswitch.wasm rename to lib/emscripten/emtests/test_llvmswitch.wasm diff --git a/emtests/test_longjmp.c b/lib/emscripten/emtests/test_longjmp.c similarity index 100% rename from emtests/test_longjmp.c rename to lib/emscripten/emtests/test_longjmp.c diff --git a/emtests/test_longjmp.out b/lib/emscripten/emtests/test_longjmp.out similarity index 100% rename from emtests/test_longjmp.out rename to lib/emscripten/emtests/test_longjmp.out diff --git a/emtests/test_longjmp.wasm b/lib/emscripten/emtests/test_longjmp.wasm similarity index 100% rename from emtests/test_longjmp.wasm rename to lib/emscripten/emtests/test_longjmp.wasm diff --git a/emtests/test_longjmp2.c b/lib/emscripten/emtests/test_longjmp2.c similarity index 100% rename from emtests/test_longjmp2.c rename to lib/emscripten/emtests/test_longjmp2.c diff --git a/emtests/test_longjmp2.out b/lib/emscripten/emtests/test_longjmp2.out similarity index 100% rename from emtests/test_longjmp2.out rename to lib/emscripten/emtests/test_longjmp2.out diff --git a/emtests/test_longjmp2.wasm b/lib/emscripten/emtests/test_longjmp2.wasm similarity index 100% rename from emtests/test_longjmp2.wasm rename to lib/emscripten/emtests/test_longjmp2.wasm diff --git a/emtests/test_longjmp3.c b/lib/emscripten/emtests/test_longjmp3.c similarity index 100% rename from emtests/test_longjmp3.c rename to lib/emscripten/emtests/test_longjmp3.c diff --git a/emtests/test_longjmp3.out b/lib/emscripten/emtests/test_longjmp3.out similarity index 100% rename from emtests/test_longjmp3.out rename to lib/emscripten/emtests/test_longjmp3.out diff --git a/emtests/test_longjmp3.wasm b/lib/emscripten/emtests/test_longjmp3.wasm similarity index 100% rename from emtests/test_longjmp3.wasm rename to lib/emscripten/emtests/test_longjmp3.wasm diff --git a/emtests/test_longjmp4.c b/lib/emscripten/emtests/test_longjmp4.c similarity index 100% rename from emtests/test_longjmp4.c rename to lib/emscripten/emtests/test_longjmp4.c diff --git a/emtests/test_longjmp4.out b/lib/emscripten/emtests/test_longjmp4.out similarity index 100% rename from emtests/test_longjmp4.out rename to lib/emscripten/emtests/test_longjmp4.out diff --git a/emtests/test_longjmp4.wasm b/lib/emscripten/emtests/test_longjmp4.wasm similarity index 100% rename from emtests/test_longjmp4.wasm rename to lib/emscripten/emtests/test_longjmp4.wasm diff --git a/emtests/test_longjmp_exc.c b/lib/emscripten/emtests/test_longjmp_exc.c similarity index 100% rename from emtests/test_longjmp_exc.c rename to lib/emscripten/emtests/test_longjmp_exc.c diff --git a/emtests/test_longjmp_exc.out b/lib/emscripten/emtests/test_longjmp_exc.out similarity index 100% rename from emtests/test_longjmp_exc.out rename to lib/emscripten/emtests/test_longjmp_exc.out diff --git a/emtests/test_longjmp_exc.wasm b/lib/emscripten/emtests/test_longjmp_exc.wasm similarity index 100% rename from emtests/test_longjmp_exc.wasm rename to lib/emscripten/emtests/test_longjmp_exc.wasm diff --git a/emtests/test_longjmp_funcptr.c b/lib/emscripten/emtests/test_longjmp_funcptr.c similarity index 100% rename from emtests/test_longjmp_funcptr.c rename to lib/emscripten/emtests/test_longjmp_funcptr.c diff --git a/emtests/test_longjmp_funcptr.out b/lib/emscripten/emtests/test_longjmp_funcptr.out similarity index 100% rename from emtests/test_longjmp_funcptr.out rename to lib/emscripten/emtests/test_longjmp_funcptr.out diff --git a/emtests/test_longjmp_funcptr.wasm b/lib/emscripten/emtests/test_longjmp_funcptr.wasm similarity index 100% rename from emtests/test_longjmp_funcptr.wasm rename to lib/emscripten/emtests/test_longjmp_funcptr.wasm diff --git a/emtests/test_longjmp_repeat.c b/lib/emscripten/emtests/test_longjmp_repeat.c similarity index 100% rename from emtests/test_longjmp_repeat.c rename to lib/emscripten/emtests/test_longjmp_repeat.c diff --git a/emtests/test_longjmp_repeat.out b/lib/emscripten/emtests/test_longjmp_repeat.out similarity index 100% rename from emtests/test_longjmp_repeat.out rename to lib/emscripten/emtests/test_longjmp_repeat.out diff --git a/emtests/test_longjmp_repeat.wasm b/lib/emscripten/emtests/test_longjmp_repeat.wasm similarity index 100% rename from emtests/test_longjmp_repeat.wasm rename to lib/emscripten/emtests/test_longjmp_repeat.wasm diff --git a/emtests/test_longjmp_stacked.c b/lib/emscripten/emtests/test_longjmp_stacked.c similarity index 100% rename from emtests/test_longjmp_stacked.c rename to lib/emscripten/emtests/test_longjmp_stacked.c diff --git a/emtests/test_longjmp_stacked.out b/lib/emscripten/emtests/test_longjmp_stacked.out similarity index 100% rename from emtests/test_longjmp_stacked.out rename to lib/emscripten/emtests/test_longjmp_stacked.out diff --git a/emtests/test_longjmp_stacked.wasm b/lib/emscripten/emtests/test_longjmp_stacked.wasm similarity index 100% rename from emtests/test_longjmp_stacked.wasm rename to lib/emscripten/emtests/test_longjmp_stacked.wasm diff --git a/emtests/test_longjmp_throw.cpp b/lib/emscripten/emtests/test_longjmp_throw.cpp similarity index 100% rename from emtests/test_longjmp_throw.cpp rename to lib/emscripten/emtests/test_longjmp_throw.cpp diff --git a/emtests/test_longjmp_throw.out b/lib/emscripten/emtests/test_longjmp_throw.out similarity index 100% rename from emtests/test_longjmp_throw.out rename to lib/emscripten/emtests/test_longjmp_throw.out diff --git a/emtests/test_longjmp_throw.wasm b/lib/emscripten/emtests/test_longjmp_throw.wasm similarity index 100% rename from emtests/test_longjmp_throw.wasm rename to lib/emscripten/emtests/test_longjmp_throw.wasm diff --git a/emtests/test_longjmp_unwind.c b/lib/emscripten/emtests/test_longjmp_unwind.c similarity index 100% rename from emtests/test_longjmp_unwind.c rename to lib/emscripten/emtests/test_longjmp_unwind.c diff --git a/emtests/test_longjmp_unwind.out b/lib/emscripten/emtests/test_longjmp_unwind.out similarity index 100% rename from emtests/test_longjmp_unwind.out rename to lib/emscripten/emtests/test_longjmp_unwind.out diff --git a/emtests/test_longjmp_unwind.wasm b/lib/emscripten/emtests/test_longjmp_unwind.wasm similarity index 100% rename from emtests/test_longjmp_unwind.wasm rename to lib/emscripten/emtests/test_longjmp_unwind.wasm diff --git a/emtests/test_loop.c b/lib/emscripten/emtests/test_loop.c similarity index 100% rename from emtests/test_loop.c rename to lib/emscripten/emtests/test_loop.c diff --git a/emtests/test_loop.out b/lib/emscripten/emtests/test_loop.out similarity index 100% rename from emtests/test_loop.out rename to lib/emscripten/emtests/test_loop.out diff --git a/emtests/test_loop.wasm b/lib/emscripten/emtests/test_loop.wasm similarity index 100% rename from emtests/test_loop.wasm rename to lib/emscripten/emtests/test_loop.wasm diff --git a/emtests/test_lower_intrinsics.c b/lib/emscripten/emtests/test_lower_intrinsics.c similarity index 100% rename from emtests/test_lower_intrinsics.c rename to lib/emscripten/emtests/test_lower_intrinsics.c diff --git a/emtests/test_lower_intrinsics.out b/lib/emscripten/emtests/test_lower_intrinsics.out similarity index 100% rename from emtests/test_lower_intrinsics.out rename to lib/emscripten/emtests/test_lower_intrinsics.out diff --git a/emtests/test_lower_intrinsics.wasm b/lib/emscripten/emtests/test_lower_intrinsics.wasm similarity index 100% rename from emtests/test_lower_intrinsics.wasm rename to lib/emscripten/emtests/test_lower_intrinsics.wasm diff --git a/emtests/test_main_module_static_align.cpp b/lib/emscripten/emtests/test_main_module_static_align.cpp similarity index 100% rename from emtests/test_main_module_static_align.cpp rename to lib/emscripten/emtests/test_main_module_static_align.cpp diff --git a/emtests/test_main_module_static_align.txt b/lib/emscripten/emtests/test_main_module_static_align.txt similarity index 100% rename from emtests/test_main_module_static_align.txt rename to lib/emscripten/emtests/test_main_module_static_align.txt diff --git a/emtests/test_main_module_static_align.wasm b/lib/emscripten/emtests/test_main_module_static_align.wasm similarity index 100% rename from emtests/test_main_module_static_align.wasm rename to lib/emscripten/emtests/test_main_module_static_align.wasm diff --git a/emtests/test_main_thread_async_em_asm.cpp b/lib/emscripten/emtests/test_main_thread_async_em_asm.cpp similarity index 100% rename from emtests/test_main_thread_async_em_asm.cpp rename to lib/emscripten/emtests/test_main_thread_async_em_asm.cpp diff --git a/emtests/test_main_thread_async_em_asm.out b/lib/emscripten/emtests/test_main_thread_async_em_asm.out similarity index 100% rename from emtests/test_main_thread_async_em_asm.out rename to lib/emscripten/emtests/test_main_thread_async_em_asm.out diff --git a/emtests/test_main_thread_async_em_asm.wasm b/lib/emscripten/emtests/test_main_thread_async_em_asm.wasm similarity index 100% rename from emtests/test_main_thread_async_em_asm.wasm rename to lib/emscripten/emtests/test_main_thread_async_em_asm.wasm diff --git a/emtests/test_mainenv.c b/lib/emscripten/emtests/test_mainenv.c similarity index 100% rename from emtests/test_mainenv.c rename to lib/emscripten/emtests/test_mainenv.c diff --git a/emtests/test_mainenv.out b/lib/emscripten/emtests/test_mainenv.out similarity index 100% rename from emtests/test_mainenv.out rename to lib/emscripten/emtests/test_mainenv.out diff --git a/emtests/test_mainenv.wasm b/lib/emscripten/emtests/test_mainenv.wasm similarity index 100% rename from emtests/test_mainenv.wasm rename to lib/emscripten/emtests/test_mainenv.wasm diff --git a/emtests/test_math.c b/lib/emscripten/emtests/test_math.c similarity index 100% rename from emtests/test_math.c rename to lib/emscripten/emtests/test_math.c diff --git a/emtests/test_math.out b/lib/emscripten/emtests/test_math.out similarity index 100% rename from emtests/test_math.out rename to lib/emscripten/emtests/test_math.out diff --git a/emtests/test_mathfuncptr.c b/lib/emscripten/emtests/test_mathfuncptr.c similarity index 100% rename from emtests/test_mathfuncptr.c rename to lib/emscripten/emtests/test_mathfuncptr.c diff --git a/emtests/test_mathfuncptr.out b/lib/emscripten/emtests/test_mathfuncptr.out similarity index 100% rename from emtests/test_mathfuncptr.out rename to lib/emscripten/emtests/test_mathfuncptr.out diff --git a/emtests/test_mathfuncptr.wasm b/lib/emscripten/emtests/test_mathfuncptr.wasm similarity index 100% rename from emtests/test_mathfuncptr.wasm rename to lib/emscripten/emtests/test_mathfuncptr.wasm diff --git a/emtests/test_memcpy2.c b/lib/emscripten/emtests/test_memcpy2.c similarity index 100% rename from emtests/test_memcpy2.c rename to lib/emscripten/emtests/test_memcpy2.c diff --git a/emtests/test_memcpy2.out b/lib/emscripten/emtests/test_memcpy2.out similarity index 100% rename from emtests/test_memcpy2.out rename to lib/emscripten/emtests/test_memcpy2.out diff --git a/emtests/test_memcpy2.wasm b/lib/emscripten/emtests/test_memcpy2.wasm similarity index 100% rename from emtests/test_memcpy2.wasm rename to lib/emscripten/emtests/test_memcpy2.wasm diff --git a/emtests/test_memcpy3.c b/lib/emscripten/emtests/test_memcpy3.c similarity index 100% rename from emtests/test_memcpy3.c rename to lib/emscripten/emtests/test_memcpy3.c diff --git a/emtests/test_memcpy3.out b/lib/emscripten/emtests/test_memcpy3.out similarity index 100% rename from emtests/test_memcpy3.out rename to lib/emscripten/emtests/test_memcpy3.out diff --git a/emtests/test_memcpy3.wasm b/lib/emscripten/emtests/test_memcpy3.wasm similarity index 100% rename from emtests/test_memcpy3.wasm rename to lib/emscripten/emtests/test_memcpy3.wasm diff --git a/emtests/test_memcpy_memcmp.c b/lib/emscripten/emtests/test_memcpy_memcmp.c similarity index 100% rename from emtests/test_memcpy_memcmp.c rename to lib/emscripten/emtests/test_memcpy_memcmp.c diff --git a/emtests/test_memcpy_memcmp.out b/lib/emscripten/emtests/test_memcpy_memcmp.out similarity index 100% rename from emtests/test_memcpy_memcmp.out rename to lib/emscripten/emtests/test_memcpy_memcmp.out diff --git a/emtests/test_memcpy_memcmp.wasm b/lib/emscripten/emtests/test_memcpy_memcmp.wasm similarity index 100% rename from emtests/test_memcpy_memcmp.wasm rename to lib/emscripten/emtests/test_memcpy_memcmp.wasm diff --git a/emtests/test_memmove.c b/lib/emscripten/emtests/test_memmove.c similarity index 100% rename from emtests/test_memmove.c rename to lib/emscripten/emtests/test_memmove.c diff --git a/emtests/test_memmove.out b/lib/emscripten/emtests/test_memmove.out similarity index 100% rename from emtests/test_memmove.out rename to lib/emscripten/emtests/test_memmove.out diff --git a/emtests/test_memmove.wasm b/lib/emscripten/emtests/test_memmove.wasm similarity index 100% rename from emtests/test_memmove.wasm rename to lib/emscripten/emtests/test_memmove.wasm diff --git a/emtests/test_memmove2.c b/lib/emscripten/emtests/test_memmove2.c similarity index 100% rename from emtests/test_memmove2.c rename to lib/emscripten/emtests/test_memmove2.c diff --git a/emtests/test_memmove2.out b/lib/emscripten/emtests/test_memmove2.out similarity index 100% rename from emtests/test_memmove2.out rename to lib/emscripten/emtests/test_memmove2.out diff --git a/emtests/test_memmove2.wasm b/lib/emscripten/emtests/test_memmove2.wasm similarity index 100% rename from emtests/test_memmove2.wasm rename to lib/emscripten/emtests/test_memmove2.wasm diff --git a/emtests/test_memmove3.c b/lib/emscripten/emtests/test_memmove3.c similarity index 100% rename from emtests/test_memmove3.c rename to lib/emscripten/emtests/test_memmove3.c diff --git a/emtests/test_memmove3.out b/lib/emscripten/emtests/test_memmove3.out similarity index 100% rename from emtests/test_memmove3.out rename to lib/emscripten/emtests/test_memmove3.out diff --git a/emtests/test_memmove3.wasm b/lib/emscripten/emtests/test_memmove3.wasm similarity index 100% rename from emtests/test_memmove3.wasm rename to lib/emscripten/emtests/test_memmove3.wasm diff --git a/emtests/test_memorygrowth.c b/lib/emscripten/emtests/test_memorygrowth.c similarity index 100% rename from emtests/test_memorygrowth.c rename to lib/emscripten/emtests/test_memorygrowth.c diff --git a/emtests/test_memorygrowth.wasm b/lib/emscripten/emtests/test_memorygrowth.wasm similarity index 100% rename from emtests/test_memorygrowth.wasm rename to lib/emscripten/emtests/test_memorygrowth.wasm diff --git a/emtests/test_memorygrowth_2.c b/lib/emscripten/emtests/test_memorygrowth_2.c similarity index 100% rename from emtests/test_memorygrowth_2.c rename to lib/emscripten/emtests/test_memorygrowth_2.c diff --git a/emtests/test_memorygrowth_2.wasm b/lib/emscripten/emtests/test_memorygrowth_2.wasm similarity index 100% rename from emtests/test_memorygrowth_2.wasm rename to lib/emscripten/emtests/test_memorygrowth_2.wasm diff --git a/emtests/test_memorygrowth_3.c b/lib/emscripten/emtests/test_memorygrowth_3.c similarity index 100% rename from emtests/test_memorygrowth_3.c rename to lib/emscripten/emtests/test_memorygrowth_3.c diff --git a/emtests/test_memorygrowth_3.txt b/lib/emscripten/emtests/test_memorygrowth_3.txt similarity index 100% rename from emtests/test_memorygrowth_3.txt rename to lib/emscripten/emtests/test_memorygrowth_3.txt diff --git a/emtests/test_memorygrowth_3.wasm b/lib/emscripten/emtests/test_memorygrowth_3.wasm similarity index 100% rename from emtests/test_memorygrowth_3.wasm rename to lib/emscripten/emtests/test_memorygrowth_3.wasm diff --git a/emtests/test_memorygrowth_wasm_mem_max.c b/lib/emscripten/emtests/test_memorygrowth_wasm_mem_max.c similarity index 100% rename from emtests/test_memorygrowth_wasm_mem_max.c rename to lib/emscripten/emtests/test_memorygrowth_wasm_mem_max.c diff --git a/emtests/test_memorygrowth_wasm_mem_max.txt b/lib/emscripten/emtests/test_memorygrowth_wasm_mem_max.txt similarity index 100% rename from emtests/test_memorygrowth_wasm_mem_max.txt rename to lib/emscripten/emtests/test_memorygrowth_wasm_mem_max.txt diff --git a/emtests/test_memorygrowth_wasm_mem_max.wasm b/lib/emscripten/emtests/test_memorygrowth_wasm_mem_max.wasm similarity index 100% rename from emtests/test_memorygrowth_wasm_mem_max.wasm rename to lib/emscripten/emtests/test_memorygrowth_wasm_mem_max.wasm diff --git a/emtests/test_memset.c b/lib/emscripten/emtests/test_memset.c similarity index 100% rename from emtests/test_memset.c rename to lib/emscripten/emtests/test_memset.c diff --git a/emtests/test_memset.out b/lib/emscripten/emtests/test_memset.out similarity index 100% rename from emtests/test_memset.out rename to lib/emscripten/emtests/test_memset.out diff --git a/emtests/test_memset.wasm b/lib/emscripten/emtests/test_memset.wasm similarity index 100% rename from emtests/test_memset.wasm rename to lib/emscripten/emtests/test_memset.wasm diff --git a/emtests/test_mmap.c b/lib/emscripten/emtests/test_mmap.c similarity index 100% rename from emtests/test_mmap.c rename to lib/emscripten/emtests/test_mmap.c diff --git a/emtests/test_mmap.out b/lib/emscripten/emtests/test_mmap.out similarity index 100% rename from emtests/test_mmap.out rename to lib/emscripten/emtests/test_mmap.out diff --git a/emtests/test_mmap.wasm b/lib/emscripten/emtests/test_mmap.wasm similarity index 100% rename from emtests/test_mmap.wasm rename to lib/emscripten/emtests/test_mmap.wasm diff --git a/emtests/test_mod_globalstruct.c b/lib/emscripten/emtests/test_mod_globalstruct.c similarity index 100% rename from emtests/test_mod_globalstruct.c rename to lib/emscripten/emtests/test_mod_globalstruct.c diff --git a/emtests/test_mod_globalstruct.out b/lib/emscripten/emtests/test_mod_globalstruct.out similarity index 100% rename from emtests/test_mod_globalstruct.out rename to lib/emscripten/emtests/test_mod_globalstruct.out diff --git a/emtests/test_negative_zero.c b/lib/emscripten/emtests/test_negative_zero.c similarity index 100% rename from emtests/test_negative_zero.c rename to lib/emscripten/emtests/test_negative_zero.c diff --git a/emtests/test_negative_zero.out b/lib/emscripten/emtests/test_negative_zero.out similarity index 100% rename from emtests/test_negative_zero.out rename to lib/emscripten/emtests/test_negative_zero.out diff --git a/emtests/test_negative_zero.wasm b/lib/emscripten/emtests/test_negative_zero.wasm similarity index 100% rename from emtests/test_negative_zero.wasm rename to lib/emscripten/emtests/test_negative_zero.wasm diff --git a/emtests/test_nested_struct_varargs.c b/lib/emscripten/emtests/test_nested_struct_varargs.c similarity index 100% rename from emtests/test_nested_struct_varargs.c rename to lib/emscripten/emtests/test_nested_struct_varargs.c diff --git a/emtests/test_nested_struct_varargs.out b/lib/emscripten/emtests/test_nested_struct_varargs.out similarity index 100% rename from emtests/test_nested_struct_varargs.out rename to lib/emscripten/emtests/test_nested_struct_varargs.out diff --git a/emtests/test_nested_struct_varargs.wasm b/lib/emscripten/emtests/test_nested_struct_varargs.wasm similarity index 100% rename from emtests/test_nested_struct_varargs.wasm rename to lib/emscripten/emtests/test_nested_struct_varargs.wasm diff --git a/emtests/test_nl_types.c b/lib/emscripten/emtests/test_nl_types.c similarity index 100% rename from emtests/test_nl_types.c rename to lib/emscripten/emtests/test_nl_types.c diff --git a/emtests/test_nl_types.out b/lib/emscripten/emtests/test_nl_types.out similarity index 100% rename from emtests/test_nl_types.out rename to lib/emscripten/emtests/test_nl_types.out diff --git a/emtests/test_nl_types.wasm b/lib/emscripten/emtests/test_nl_types.wasm similarity index 100% rename from emtests/test_nl_types.wasm rename to lib/emscripten/emtests/test_nl_types.wasm diff --git a/emtests/test_perrar.c b/lib/emscripten/emtests/test_perrar.c similarity index 100% rename from emtests/test_perrar.c rename to lib/emscripten/emtests/test_perrar.c diff --git a/emtests/test_perrar.out b/lib/emscripten/emtests/test_perrar.out similarity index 100% rename from emtests/test_perrar.out rename to lib/emscripten/emtests/test_perrar.out diff --git a/emtests/test_perrar.wasm b/lib/emscripten/emtests/test_perrar.wasm similarity index 100% rename from emtests/test_perrar.wasm rename to lib/emscripten/emtests/test_perrar.wasm diff --git a/emtests/test_phiundef.c b/lib/emscripten/emtests/test_phiundef.c similarity index 100% rename from emtests/test_phiundef.c rename to lib/emscripten/emtests/test_phiundef.c diff --git a/emtests/test_phiundef.out b/lib/emscripten/emtests/test_phiundef.out similarity index 100% rename from emtests/test_phiundef.out rename to lib/emscripten/emtests/test_phiundef.out diff --git a/emtests/test_phiundef.wasm b/lib/emscripten/emtests/test_phiundef.wasm similarity index 100% rename from emtests/test_phiundef.wasm rename to lib/emscripten/emtests/test_phiundef.wasm diff --git a/emtests/test_poll.c b/lib/emscripten/emtests/test_poll.c similarity index 100% rename from emtests/test_poll.c rename to lib/emscripten/emtests/test_poll.c diff --git a/emtests/test_poll.out b/lib/emscripten/emtests/test_poll.out similarity index 100% rename from emtests/test_poll.out rename to lib/emscripten/emtests/test_poll.out diff --git a/emtests/test_poll.wasm b/lib/emscripten/emtests/test_poll.wasm similarity index 100% rename from emtests/test_poll.wasm rename to lib/emscripten/emtests/test_poll.wasm diff --git a/emtests/test_polymorph.c b/lib/emscripten/emtests/test_polymorph.c similarity index 100% rename from emtests/test_polymorph.c rename to lib/emscripten/emtests/test_polymorph.c diff --git a/emtests/test_polymorph.out b/lib/emscripten/emtests/test_polymorph.out similarity index 100% rename from emtests/test_polymorph.out rename to lib/emscripten/emtests/test_polymorph.out diff --git a/emtests/test_posixtime.c b/lib/emscripten/emtests/test_posixtime.c similarity index 100% rename from emtests/test_posixtime.c rename to lib/emscripten/emtests/test_posixtime.c diff --git a/emtests/test_posixtime.out b/lib/emscripten/emtests/test_posixtime.out similarity index 100% rename from emtests/test_posixtime.out rename to lib/emscripten/emtests/test_posixtime.out diff --git a/emtests/test_posixtime.wasm b/lib/emscripten/emtests/test_posixtime.wasm similarity index 100% rename from emtests/test_posixtime.wasm rename to lib/emscripten/emtests/test_posixtime.wasm diff --git a/emtests/test_posixtime_no_monotonic.out b/lib/emscripten/emtests/test_posixtime_no_monotonic.out similarity index 100% rename from emtests/test_posixtime_no_monotonic.out rename to lib/emscripten/emtests/test_posixtime_no_monotonic.out diff --git a/emtests/test_printf_2.c b/lib/emscripten/emtests/test_printf_2.c similarity index 100% rename from emtests/test_printf_2.c rename to lib/emscripten/emtests/test_printf_2.c diff --git a/emtests/test_printf_2.out b/lib/emscripten/emtests/test_printf_2.out similarity index 100% rename from emtests/test_printf_2.out rename to lib/emscripten/emtests/test_printf_2.out diff --git a/emtests/test_printf_2.wasm b/lib/emscripten/emtests/test_printf_2.wasm similarity index 100% rename from emtests/test_printf_2.wasm rename to lib/emscripten/emtests/test_printf_2.wasm diff --git a/emtests/test_printf_more.c b/lib/emscripten/emtests/test_printf_more.c similarity index 100% rename from emtests/test_printf_more.c rename to lib/emscripten/emtests/test_printf_more.c diff --git a/emtests/test_printf_more.out b/lib/emscripten/emtests/test_printf_more.out similarity index 100% rename from emtests/test_printf_more.out rename to lib/emscripten/emtests/test_printf_more.out diff --git a/emtests/test_printf_more.wasm b/lib/emscripten/emtests/test_printf_more.wasm similarity index 100% rename from emtests/test_printf_more.wasm rename to lib/emscripten/emtests/test_printf_more.wasm diff --git a/emtests/test_ptrtoint.out b/lib/emscripten/emtests/test_ptrtoint.out similarity index 100% rename from emtests/test_ptrtoint.out rename to lib/emscripten/emtests/test_ptrtoint.out diff --git a/emtests/test_random_device.cpp b/lib/emscripten/emtests/test_random_device.cpp similarity index 100% rename from emtests/test_random_device.cpp rename to lib/emscripten/emtests/test_random_device.cpp diff --git a/emtests/test_random_device.txt b/lib/emscripten/emtests/test_random_device.txt similarity index 100% rename from emtests/test_random_device.txt rename to lib/emscripten/emtests/test_random_device.txt diff --git a/emtests/test_regex.c b/lib/emscripten/emtests/test_regex.c similarity index 100% rename from emtests/test_regex.c rename to lib/emscripten/emtests/test_regex.c diff --git a/emtests/test_regex.out b/lib/emscripten/emtests/test_regex.out similarity index 100% rename from emtests/test_regex.out rename to lib/emscripten/emtests/test_regex.out diff --git a/emtests/test_regex.wasm b/lib/emscripten/emtests/test_regex.wasm similarity index 100% rename from emtests/test_regex.wasm rename to lib/emscripten/emtests/test_regex.wasm diff --git a/emtests/test_reinterpreted_ptrs.c b/lib/emscripten/emtests/test_reinterpreted_ptrs.c similarity index 100% rename from emtests/test_reinterpreted_ptrs.c rename to lib/emscripten/emtests/test_reinterpreted_ptrs.c diff --git a/emtests/test_reinterpreted_ptrs.out b/lib/emscripten/emtests/test_reinterpreted_ptrs.out similarity index 100% rename from emtests/test_reinterpreted_ptrs.out rename to lib/emscripten/emtests/test_reinterpreted_ptrs.out diff --git a/emtests/test_relocatable_void_function.c b/lib/emscripten/emtests/test_relocatable_void_function.c similarity index 100% rename from emtests/test_relocatable_void_function.c rename to lib/emscripten/emtests/test_relocatable_void_function.c diff --git a/emtests/test_relocatable_void_function.out b/lib/emscripten/emtests/test_relocatable_void_function.out similarity index 100% rename from emtests/test_relocatable_void_function.out rename to lib/emscripten/emtests/test_relocatable_void_function.out diff --git a/emtests/test_relocatable_void_function.wasm b/lib/emscripten/emtests/test_relocatable_void_function.wasm similarity index 100% rename from emtests/test_relocatable_void_function.wasm rename to lib/emscripten/emtests/test_relocatable_void_function.wasm diff --git a/emtests/test_rounding.c b/lib/emscripten/emtests/test_rounding.c similarity index 100% rename from emtests/test_rounding.c rename to lib/emscripten/emtests/test_rounding.c diff --git a/emtests/test_rounding.out b/lib/emscripten/emtests/test_rounding.out similarity index 100% rename from emtests/test_rounding.out rename to lib/emscripten/emtests/test_rounding.out diff --git a/emtests/test_rounding.wasm b/lib/emscripten/emtests/test_rounding.wasm similarity index 100% rename from emtests/test_rounding.wasm rename to lib/emscripten/emtests/test_rounding.wasm diff --git a/emtests/test_runtime_stacksave.c b/lib/emscripten/emtests/test_runtime_stacksave.c similarity index 100% rename from emtests/test_runtime_stacksave.c rename to lib/emscripten/emtests/test_runtime_stacksave.c diff --git a/emtests/test_runtime_stacksave.wasm b/lib/emscripten/emtests/test_runtime_stacksave.wasm similarity index 100% rename from emtests/test_runtime_stacksave.wasm rename to lib/emscripten/emtests/test_runtime_stacksave.wasm diff --git a/emtests/test_set_align.c b/lib/emscripten/emtests/test_set_align.c similarity index 100% rename from emtests/test_set_align.c rename to lib/emscripten/emtests/test_set_align.c diff --git a/emtests/test_set_align.out b/lib/emscripten/emtests/test_set_align.out similarity index 100% rename from emtests/test_set_align.out rename to lib/emscripten/emtests/test_set_align.out diff --git a/emtests/test_set_align.wasm b/lib/emscripten/emtests/test_set_align.wasm similarity index 100% rename from emtests/test_set_align.wasm rename to lib/emscripten/emtests/test_set_align.wasm diff --git a/emtests/test_siglongjmp.c b/lib/emscripten/emtests/test_siglongjmp.c similarity index 100% rename from emtests/test_siglongjmp.c rename to lib/emscripten/emtests/test_siglongjmp.c diff --git a/emtests/test_siglongjmp.out b/lib/emscripten/emtests/test_siglongjmp.out similarity index 100% rename from emtests/test_siglongjmp.out rename to lib/emscripten/emtests/test_siglongjmp.out diff --git a/emtests/test_siglongjmp.wasm b/lib/emscripten/emtests/test_siglongjmp.wasm similarity index 100% rename from emtests/test_siglongjmp.wasm rename to lib/emscripten/emtests/test_siglongjmp.wasm diff --git a/emtests/test_simd.c b/lib/emscripten/emtests/test_simd.c similarity index 100% rename from emtests/test_simd.c rename to lib/emscripten/emtests/test_simd.c diff --git a/emtests/test_simd.out b/lib/emscripten/emtests/test_simd.out similarity index 100% rename from emtests/test_simd.out rename to lib/emscripten/emtests/test_simd.out diff --git a/emtests/test_simd10.c b/lib/emscripten/emtests/test_simd10.c similarity index 100% rename from emtests/test_simd10.c rename to lib/emscripten/emtests/test_simd10.c diff --git a/emtests/test_simd10.out b/lib/emscripten/emtests/test_simd10.out similarity index 100% rename from emtests/test_simd10.out rename to lib/emscripten/emtests/test_simd10.out diff --git a/emtests/test_simd11.c b/lib/emscripten/emtests/test_simd11.c similarity index 100% rename from emtests/test_simd11.c rename to lib/emscripten/emtests/test_simd11.c diff --git a/emtests/test_simd11.out b/lib/emscripten/emtests/test_simd11.out similarity index 100% rename from emtests/test_simd11.out rename to lib/emscripten/emtests/test_simd11.out diff --git a/emtests/test_simd12.c b/lib/emscripten/emtests/test_simd12.c similarity index 100% rename from emtests/test_simd12.c rename to lib/emscripten/emtests/test_simd12.c diff --git a/emtests/test_simd12.out b/lib/emscripten/emtests/test_simd12.out similarity index 100% rename from emtests/test_simd12.out rename to lib/emscripten/emtests/test_simd12.out diff --git a/emtests/test_simd13.c b/lib/emscripten/emtests/test_simd13.c similarity index 100% rename from emtests/test_simd13.c rename to lib/emscripten/emtests/test_simd13.c diff --git a/emtests/test_simd13.out b/lib/emscripten/emtests/test_simd13.out similarity index 100% rename from emtests/test_simd13.out rename to lib/emscripten/emtests/test_simd13.out diff --git a/emtests/test_simd14.c b/lib/emscripten/emtests/test_simd14.c similarity index 100% rename from emtests/test_simd14.c rename to lib/emscripten/emtests/test_simd14.c diff --git a/emtests/test_simd14.out b/lib/emscripten/emtests/test_simd14.out similarity index 100% rename from emtests/test_simd14.out rename to lib/emscripten/emtests/test_simd14.out diff --git a/emtests/test_simd15.c b/lib/emscripten/emtests/test_simd15.c similarity index 100% rename from emtests/test_simd15.c rename to lib/emscripten/emtests/test_simd15.c diff --git a/emtests/test_simd15.out b/lib/emscripten/emtests/test_simd15.out similarity index 100% rename from emtests/test_simd15.out rename to lib/emscripten/emtests/test_simd15.out diff --git a/emtests/test_simd16.c b/lib/emscripten/emtests/test_simd16.c similarity index 100% rename from emtests/test_simd16.c rename to lib/emscripten/emtests/test_simd16.c diff --git a/emtests/test_simd16.out b/lib/emscripten/emtests/test_simd16.out similarity index 100% rename from emtests/test_simd16.out rename to lib/emscripten/emtests/test_simd16.out diff --git a/emtests/test_simd2.c b/lib/emscripten/emtests/test_simd2.c similarity index 100% rename from emtests/test_simd2.c rename to lib/emscripten/emtests/test_simd2.c diff --git a/emtests/test_simd2.out b/lib/emscripten/emtests/test_simd2.out similarity index 100% rename from emtests/test_simd2.out rename to lib/emscripten/emtests/test_simd2.out diff --git a/emtests/test_simd3.c b/lib/emscripten/emtests/test_simd3.c similarity index 100% rename from emtests/test_simd3.c rename to lib/emscripten/emtests/test_simd3.c diff --git a/emtests/test_simd3.out b/lib/emscripten/emtests/test_simd3.out similarity index 100% rename from emtests/test_simd3.out rename to lib/emscripten/emtests/test_simd3.out diff --git a/emtests/test_simd4.c b/lib/emscripten/emtests/test_simd4.c similarity index 100% rename from emtests/test_simd4.c rename to lib/emscripten/emtests/test_simd4.c diff --git a/emtests/test_simd4.out b/lib/emscripten/emtests/test_simd4.out similarity index 100% rename from emtests/test_simd4.out rename to lib/emscripten/emtests/test_simd4.out diff --git a/emtests/test_simd5.c b/lib/emscripten/emtests/test_simd5.c similarity index 100% rename from emtests/test_simd5.c rename to lib/emscripten/emtests/test_simd5.c diff --git a/emtests/test_simd5.out b/lib/emscripten/emtests/test_simd5.out similarity index 100% rename from emtests/test_simd5.out rename to lib/emscripten/emtests/test_simd5.out diff --git a/emtests/test_simd6.c b/lib/emscripten/emtests/test_simd6.c similarity index 100% rename from emtests/test_simd6.c rename to lib/emscripten/emtests/test_simd6.c diff --git a/emtests/test_simd6.out b/lib/emscripten/emtests/test_simd6.out similarity index 100% rename from emtests/test_simd6.out rename to lib/emscripten/emtests/test_simd6.out diff --git a/emtests/test_simd7.c b/lib/emscripten/emtests/test_simd7.c similarity index 100% rename from emtests/test_simd7.c rename to lib/emscripten/emtests/test_simd7.c diff --git a/emtests/test_simd7.out b/lib/emscripten/emtests/test_simd7.out similarity index 100% rename from emtests/test_simd7.out rename to lib/emscripten/emtests/test_simd7.out diff --git a/emtests/test_simd8.c b/lib/emscripten/emtests/test_simd8.c similarity index 100% rename from emtests/test_simd8.c rename to lib/emscripten/emtests/test_simd8.c diff --git a/emtests/test_simd8.out b/lib/emscripten/emtests/test_simd8.out similarity index 100% rename from emtests/test_simd8.out rename to lib/emscripten/emtests/test_simd8.out diff --git a/emtests/test_simd9.c b/lib/emscripten/emtests/test_simd9.c similarity index 100% rename from emtests/test_simd9.c rename to lib/emscripten/emtests/test_simd9.c diff --git a/emtests/test_simd9.out b/lib/emscripten/emtests/test_simd9.out similarity index 100% rename from emtests/test_simd9.out rename to lib/emscripten/emtests/test_simd9.out diff --git a/emtests/test_simd_dyncall.cpp b/lib/emscripten/emtests/test_simd_dyncall.cpp similarity index 100% rename from emtests/test_simd_dyncall.cpp rename to lib/emscripten/emtests/test_simd_dyncall.cpp diff --git a/emtests/test_simd_dyncall.txt b/lib/emscripten/emtests/test_simd_dyncall.txt similarity index 100% rename from emtests/test_simd_dyncall.txt rename to lib/emscripten/emtests/test_simd_dyncall.txt diff --git a/emtests/test_simd_float32x4.c b/lib/emscripten/emtests/test_simd_float32x4.c similarity index 100% rename from emtests/test_simd_float32x4.c rename to lib/emscripten/emtests/test_simd_float32x4.c diff --git a/emtests/test_simd_float32x4.out b/lib/emscripten/emtests/test_simd_float32x4.out similarity index 100% rename from emtests/test_simd_float32x4.out rename to lib/emscripten/emtests/test_simd_float32x4.out diff --git a/emtests/test_simd_float64x2.c b/lib/emscripten/emtests/test_simd_float64x2.c similarity index 100% rename from emtests/test_simd_float64x2.c rename to lib/emscripten/emtests/test_simd_float64x2.c diff --git a/emtests/test_simd_float64x2.out b/lib/emscripten/emtests/test_simd_float64x2.out similarity index 100% rename from emtests/test_simd_float64x2.out rename to lib/emscripten/emtests/test_simd_float64x2.out diff --git a/emtests/test_simd_int16x8.c b/lib/emscripten/emtests/test_simd_int16x8.c similarity index 100% rename from emtests/test_simd_int16x8.c rename to lib/emscripten/emtests/test_simd_int16x8.c diff --git a/emtests/test_simd_int16x8.out b/lib/emscripten/emtests/test_simd_int16x8.out similarity index 100% rename from emtests/test_simd_int16x8.out rename to lib/emscripten/emtests/test_simd_int16x8.out diff --git a/emtests/test_simd_int32x4.c b/lib/emscripten/emtests/test_simd_int32x4.c similarity index 100% rename from emtests/test_simd_int32x4.c rename to lib/emscripten/emtests/test_simd_int32x4.c diff --git a/emtests/test_simd_int32x4.out b/lib/emscripten/emtests/test_simd_int32x4.out similarity index 100% rename from emtests/test_simd_int32x4.out rename to lib/emscripten/emtests/test_simd_int32x4.out diff --git a/emtests/test_simd_int8x16.c b/lib/emscripten/emtests/test_simd_int8x16.c similarity index 100% rename from emtests/test_simd_int8x16.c rename to lib/emscripten/emtests/test_simd_int8x16.c diff --git a/emtests/test_simd_int8x16.out b/lib/emscripten/emtests/test_simd_int8x16.out similarity index 100% rename from emtests/test_simd_int8x16.out rename to lib/emscripten/emtests/test_simd_int8x16.out diff --git a/emtests/test_simd_set_epi64x.c b/lib/emscripten/emtests/test_simd_set_epi64x.c similarity index 100% rename from emtests/test_simd_set_epi64x.c rename to lib/emscripten/emtests/test_simd_set_epi64x.c diff --git a/emtests/test_simd_set_epi64x.out b/lib/emscripten/emtests/test_simd_set_epi64x.out similarity index 100% rename from emtests/test_simd_set_epi64x.out rename to lib/emscripten/emtests/test_simd_set_epi64x.out diff --git a/emtests/test_simd_shift_right.c b/lib/emscripten/emtests/test_simd_shift_right.c similarity index 100% rename from emtests/test_simd_shift_right.c rename to lib/emscripten/emtests/test_simd_shift_right.c diff --git a/emtests/test_simd_shift_right.out b/lib/emscripten/emtests/test_simd_shift_right.out similarity index 100% rename from emtests/test_simd_shift_right.out rename to lib/emscripten/emtests/test_simd_shift_right.out diff --git a/emtests/test_simd_sitofp.c b/lib/emscripten/emtests/test_simd_sitofp.c similarity index 100% rename from emtests/test_simd_sitofp.c rename to lib/emscripten/emtests/test_simd_sitofp.c diff --git a/emtests/test_simd_sitofp.out b/lib/emscripten/emtests/test_simd_sitofp.out similarity index 100% rename from emtests/test_simd_sitofp.out rename to lib/emscripten/emtests/test_simd_sitofp.out diff --git a/emtests/test_sintvars.c b/lib/emscripten/emtests/test_sintvars.c similarity index 100% rename from emtests/test_sintvars.c rename to lib/emscripten/emtests/test_sintvars.c diff --git a/emtests/test_sintvars.out b/lib/emscripten/emtests/test_sintvars.out similarity index 100% rename from emtests/test_sintvars.out rename to lib/emscripten/emtests/test_sintvars.out diff --git a/emtests/test_sintvars.wasm b/lib/emscripten/emtests/test_sintvars.wasm similarity index 100% rename from emtests/test_sintvars.wasm rename to lib/emscripten/emtests/test_sintvars.wasm diff --git a/emtests/test_sizeof.cpp b/lib/emscripten/emtests/test_sizeof.cpp similarity index 100% rename from emtests/test_sizeof.cpp rename to lib/emscripten/emtests/test_sizeof.cpp diff --git a/emtests/test_sizeof.out b/lib/emscripten/emtests/test_sizeof.out similarity index 100% rename from emtests/test_sizeof.out rename to lib/emscripten/emtests/test_sizeof.out diff --git a/emtests/test_sizeof.wasm b/lib/emscripten/emtests/test_sizeof.wasm similarity index 100% rename from emtests/test_sizeof.wasm rename to lib/emscripten/emtests/test_sizeof.wasm diff --git a/emtests/test_sscanf.c b/lib/emscripten/emtests/test_sscanf.c similarity index 100% rename from emtests/test_sscanf.c rename to lib/emscripten/emtests/test_sscanf.c diff --git a/emtests/test_sscanf.out b/lib/emscripten/emtests/test_sscanf.out similarity index 100% rename from emtests/test_sscanf.out rename to lib/emscripten/emtests/test_sscanf.out diff --git a/emtests/test_sscanf.wasm b/lib/emscripten/emtests/test_sscanf.wasm similarity index 100% rename from emtests/test_sscanf.wasm rename to lib/emscripten/emtests/test_sscanf.wasm diff --git a/emtests/test_sscanf_3.c b/lib/emscripten/emtests/test_sscanf_3.c similarity index 100% rename from emtests/test_sscanf_3.c rename to lib/emscripten/emtests/test_sscanf_3.c diff --git a/emtests/test_sscanf_3.out b/lib/emscripten/emtests/test_sscanf_3.out similarity index 100% rename from emtests/test_sscanf_3.out rename to lib/emscripten/emtests/test_sscanf_3.out diff --git a/emtests/test_sscanf_3.wasm b/lib/emscripten/emtests/test_sscanf_3.wasm similarity index 100% rename from emtests/test_sscanf_3.wasm rename to lib/emscripten/emtests/test_sscanf_3.wasm diff --git a/emtests/test_sscanf_4.c b/lib/emscripten/emtests/test_sscanf_4.c similarity index 100% rename from emtests/test_sscanf_4.c rename to lib/emscripten/emtests/test_sscanf_4.c diff --git a/emtests/test_sscanf_4.out b/lib/emscripten/emtests/test_sscanf_4.out similarity index 100% rename from emtests/test_sscanf_4.out rename to lib/emscripten/emtests/test_sscanf_4.out diff --git a/emtests/test_sscanf_4.wasm b/lib/emscripten/emtests/test_sscanf_4.wasm similarity index 100% rename from emtests/test_sscanf_4.wasm rename to lib/emscripten/emtests/test_sscanf_4.wasm diff --git a/emtests/test_sscanf_5.c b/lib/emscripten/emtests/test_sscanf_5.c similarity index 100% rename from emtests/test_sscanf_5.c rename to lib/emscripten/emtests/test_sscanf_5.c diff --git a/emtests/test_sscanf_5.out b/lib/emscripten/emtests/test_sscanf_5.out similarity index 100% rename from emtests/test_sscanf_5.out rename to lib/emscripten/emtests/test_sscanf_5.out diff --git a/emtests/test_sscanf_5.wasm b/lib/emscripten/emtests/test_sscanf_5.wasm similarity index 100% rename from emtests/test_sscanf_5.wasm rename to lib/emscripten/emtests/test_sscanf_5.wasm diff --git a/emtests/test_sscanf_6.c b/lib/emscripten/emtests/test_sscanf_6.c similarity index 100% rename from emtests/test_sscanf_6.c rename to lib/emscripten/emtests/test_sscanf_6.c diff --git a/emtests/test_sscanf_6.out b/lib/emscripten/emtests/test_sscanf_6.out similarity index 100% rename from emtests/test_sscanf_6.out rename to lib/emscripten/emtests/test_sscanf_6.out diff --git a/emtests/test_sscanf_6.wasm b/lib/emscripten/emtests/test_sscanf_6.wasm similarity index 100% rename from emtests/test_sscanf_6.wasm rename to lib/emscripten/emtests/test_sscanf_6.wasm diff --git a/emtests/test_sscanf_caps.c b/lib/emscripten/emtests/test_sscanf_caps.c similarity index 100% rename from emtests/test_sscanf_caps.c rename to lib/emscripten/emtests/test_sscanf_caps.c diff --git a/emtests/test_sscanf_caps.out b/lib/emscripten/emtests/test_sscanf_caps.out similarity index 100% rename from emtests/test_sscanf_caps.out rename to lib/emscripten/emtests/test_sscanf_caps.out diff --git a/emtests/test_sscanf_caps.wasm b/lib/emscripten/emtests/test_sscanf_caps.wasm similarity index 100% rename from emtests/test_sscanf_caps.wasm rename to lib/emscripten/emtests/test_sscanf_caps.wasm diff --git a/emtests/test_sscanf_float.c b/lib/emscripten/emtests/test_sscanf_float.c similarity index 100% rename from emtests/test_sscanf_float.c rename to lib/emscripten/emtests/test_sscanf_float.c diff --git a/emtests/test_sscanf_float.out b/lib/emscripten/emtests/test_sscanf_float.out similarity index 100% rename from emtests/test_sscanf_float.out rename to lib/emscripten/emtests/test_sscanf_float.out diff --git a/emtests/test_sscanf_float.wasm b/lib/emscripten/emtests/test_sscanf_float.wasm similarity index 100% rename from emtests/test_sscanf_float.wasm rename to lib/emscripten/emtests/test_sscanf_float.wasm diff --git a/emtests/test_sscanf_hex.cpp b/lib/emscripten/emtests/test_sscanf_hex.cpp similarity index 100% rename from emtests/test_sscanf_hex.cpp rename to lib/emscripten/emtests/test_sscanf_hex.cpp diff --git a/emtests/test_sscanf_hex.out b/lib/emscripten/emtests/test_sscanf_hex.out similarity index 100% rename from emtests/test_sscanf_hex.out rename to lib/emscripten/emtests/test_sscanf_hex.out diff --git a/emtests/test_sscanf_hex.wasm b/lib/emscripten/emtests/test_sscanf_hex.wasm similarity index 100% rename from emtests/test_sscanf_hex.wasm rename to lib/emscripten/emtests/test_sscanf_hex.wasm diff --git a/emtests/test_sscanf_n.c b/lib/emscripten/emtests/test_sscanf_n.c similarity index 100% rename from emtests/test_sscanf_n.c rename to lib/emscripten/emtests/test_sscanf_n.c diff --git a/emtests/test_sscanf_n.out b/lib/emscripten/emtests/test_sscanf_n.out similarity index 100% rename from emtests/test_sscanf_n.out rename to lib/emscripten/emtests/test_sscanf_n.out diff --git a/emtests/test_sscanf_n.wasm b/lib/emscripten/emtests/test_sscanf_n.wasm similarity index 100% rename from emtests/test_sscanf_n.wasm rename to lib/emscripten/emtests/test_sscanf_n.wasm diff --git a/emtests/test_sscanf_other_whitespace.c b/lib/emscripten/emtests/test_sscanf_other_whitespace.c similarity index 100% rename from emtests/test_sscanf_other_whitespace.c rename to lib/emscripten/emtests/test_sscanf_other_whitespace.c diff --git a/emtests/test_sscanf_other_whitespace.out b/lib/emscripten/emtests/test_sscanf_other_whitespace.out similarity index 100% rename from emtests/test_sscanf_other_whitespace.out rename to lib/emscripten/emtests/test_sscanf_other_whitespace.out diff --git a/emtests/test_sscanf_other_whitespace.wasm b/lib/emscripten/emtests/test_sscanf_other_whitespace.wasm similarity index 100% rename from emtests/test_sscanf_other_whitespace.wasm rename to lib/emscripten/emtests/test_sscanf_other_whitespace.wasm diff --git a/emtests/test_sscanf_skip.c b/lib/emscripten/emtests/test_sscanf_skip.c similarity index 100% rename from emtests/test_sscanf_skip.c rename to lib/emscripten/emtests/test_sscanf_skip.c diff --git a/emtests/test_sscanf_skip.out b/lib/emscripten/emtests/test_sscanf_skip.out similarity index 100% rename from emtests/test_sscanf_skip.out rename to lib/emscripten/emtests/test_sscanf_skip.out diff --git a/emtests/test_sscanf_skip.wasm b/lib/emscripten/emtests/test_sscanf_skip.wasm similarity index 100% rename from emtests/test_sscanf_skip.wasm rename to lib/emscripten/emtests/test_sscanf_skip.wasm diff --git a/emtests/test_sscanf_whitespace.c b/lib/emscripten/emtests/test_sscanf_whitespace.c similarity index 100% rename from emtests/test_sscanf_whitespace.c rename to lib/emscripten/emtests/test_sscanf_whitespace.c diff --git a/emtests/test_sscanf_whitespace.out b/lib/emscripten/emtests/test_sscanf_whitespace.out similarity index 100% rename from emtests/test_sscanf_whitespace.out rename to lib/emscripten/emtests/test_sscanf_whitespace.out diff --git a/emtests/test_sscanf_whitespace.wasm b/lib/emscripten/emtests/test_sscanf_whitespace.wasm similarity index 100% rename from emtests/test_sscanf_whitespace.wasm rename to lib/emscripten/emtests/test_sscanf_whitespace.wasm diff --git a/emtests/test_stack.c b/lib/emscripten/emtests/test_stack.c similarity index 100% rename from emtests/test_stack.c rename to lib/emscripten/emtests/test_stack.c diff --git a/emtests/test_stack.out b/lib/emscripten/emtests/test_stack.out similarity index 100% rename from emtests/test_stack.out rename to lib/emscripten/emtests/test_stack.out diff --git a/emtests/test_stack_align.cpp b/lib/emscripten/emtests/test_stack_align.cpp similarity index 100% rename from emtests/test_stack_align.cpp rename to lib/emscripten/emtests/test_stack_align.cpp diff --git a/emtests/test_stack_align.wasm b/lib/emscripten/emtests/test_stack_align.wasm similarity index 100% rename from emtests/test_stack_align.wasm rename to lib/emscripten/emtests/test_stack_align.wasm diff --git a/emtests/test_stack_byval.c b/lib/emscripten/emtests/test_stack_byval.c similarity index 100% rename from emtests/test_stack_byval.c rename to lib/emscripten/emtests/test_stack_byval.c diff --git a/emtests/test_stack_byval.out b/lib/emscripten/emtests/test_stack_byval.out similarity index 100% rename from emtests/test_stack_byval.out rename to lib/emscripten/emtests/test_stack_byval.out diff --git a/emtests/test_stack_restore.c b/lib/emscripten/emtests/test_stack_restore.c similarity index 100% rename from emtests/test_stack_restore.c rename to lib/emscripten/emtests/test_stack_restore.c diff --git a/emtests/test_stack_restore.out b/lib/emscripten/emtests/test_stack_restore.out similarity index 100% rename from emtests/test_stack_restore.out rename to lib/emscripten/emtests/test_stack_restore.out diff --git a/emtests/test_stack_varargs.c b/lib/emscripten/emtests/test_stack_varargs.c similarity index 100% rename from emtests/test_stack_varargs.c rename to lib/emscripten/emtests/test_stack_varargs.c diff --git a/emtests/test_stack_varargs.out b/lib/emscripten/emtests/test_stack_varargs.out similarity index 100% rename from emtests/test_stack_varargs.out rename to lib/emscripten/emtests/test_stack_varargs.out diff --git a/emtests/test_stack_varargs.wasm b/lib/emscripten/emtests/test_stack_varargs.wasm similarity index 100% rename from emtests/test_stack_varargs.wasm rename to lib/emscripten/emtests/test_stack_varargs.wasm diff --git a/emtests/test_stack_void.c b/lib/emscripten/emtests/test_stack_void.c similarity index 100% rename from emtests/test_stack_void.c rename to lib/emscripten/emtests/test_stack_void.c diff --git a/emtests/test_stack_void.out b/lib/emscripten/emtests/test_stack_void.out similarity index 100% rename from emtests/test_stack_void.out rename to lib/emscripten/emtests/test_stack_void.out diff --git a/emtests/test_stack_void.wasm b/lib/emscripten/emtests/test_stack_void.wasm similarity index 100% rename from emtests/test_stack_void.wasm rename to lib/emscripten/emtests/test_stack_void.wasm diff --git a/emtests/test_static_variable.c b/lib/emscripten/emtests/test_static_variable.c similarity index 100% rename from emtests/test_static_variable.c rename to lib/emscripten/emtests/test_static_variable.c diff --git a/emtests/test_static_variable.out b/lib/emscripten/emtests/test_static_variable.out similarity index 100% rename from emtests/test_static_variable.out rename to lib/emscripten/emtests/test_static_variable.out diff --git a/emtests/test_statics.c b/lib/emscripten/emtests/test_statics.c similarity index 100% rename from emtests/test_statics.c rename to lib/emscripten/emtests/test_statics.c diff --git a/emtests/test_statics.out b/lib/emscripten/emtests/test_statics.out similarity index 100% rename from emtests/test_statics.out rename to lib/emscripten/emtests/test_statics.out diff --git a/emtests/test_statvfs.c b/lib/emscripten/emtests/test_statvfs.c similarity index 100% rename from emtests/test_statvfs.c rename to lib/emscripten/emtests/test_statvfs.c diff --git a/emtests/test_statvfs.out b/lib/emscripten/emtests/test_statvfs.out similarity index 100% rename from emtests/test_statvfs.out rename to lib/emscripten/emtests/test_statvfs.out diff --git a/emtests/test_statvfs.wasm b/lib/emscripten/emtests/test_statvfs.wasm similarity index 100% rename from emtests/test_statvfs.wasm rename to lib/emscripten/emtests/test_statvfs.wasm diff --git a/emtests/test_std_cout_new.cpp b/lib/emscripten/emtests/test_std_cout_new.cpp similarity index 100% rename from emtests/test_std_cout_new.cpp rename to lib/emscripten/emtests/test_std_cout_new.cpp diff --git a/emtests/test_std_cout_new.out b/lib/emscripten/emtests/test_std_cout_new.out similarity index 100% rename from emtests/test_std_cout_new.out rename to lib/emscripten/emtests/test_std_cout_new.out diff --git a/emtests/test_std_cout_new.wasm b/lib/emscripten/emtests/test_std_cout_new.wasm similarity index 100% rename from emtests/test_std_cout_new.wasm rename to lib/emscripten/emtests/test_std_cout_new.wasm diff --git a/emtests/test_stdlibs.c b/lib/emscripten/emtests/test_stdlibs.c similarity index 100% rename from emtests/test_stdlibs.c rename to lib/emscripten/emtests/test_stdlibs.c diff --git a/emtests/test_stdlibs.out b/lib/emscripten/emtests/test_stdlibs.out similarity index 100% rename from emtests/test_stdlibs.out rename to lib/emscripten/emtests/test_stdlibs.out diff --git a/emtests/test_stdvec.c b/lib/emscripten/emtests/test_stdvec.c similarity index 100% rename from emtests/test_stdvec.c rename to lib/emscripten/emtests/test_stdvec.c diff --git a/emtests/test_stdvec.out b/lib/emscripten/emtests/test_stdvec.out similarity index 100% rename from emtests/test_stdvec.out rename to lib/emscripten/emtests/test_stdvec.out diff --git a/emtests/test_strcasecmp.c b/lib/emscripten/emtests/test_strcasecmp.c similarity index 100% rename from emtests/test_strcasecmp.c rename to lib/emscripten/emtests/test_strcasecmp.c diff --git a/emtests/test_strcasecmp.out b/lib/emscripten/emtests/test_strcasecmp.out similarity index 100% rename from emtests/test_strcasecmp.out rename to lib/emscripten/emtests/test_strcasecmp.out diff --git a/emtests/test_strcasecmp.wasm b/lib/emscripten/emtests/test_strcasecmp.wasm similarity index 100% rename from emtests/test_strcasecmp.wasm rename to lib/emscripten/emtests/test_strcasecmp.wasm diff --git a/emtests/test_strcmp_uni.c b/lib/emscripten/emtests/test_strcmp_uni.c similarity index 100% rename from emtests/test_strcmp_uni.c rename to lib/emscripten/emtests/test_strcmp_uni.c diff --git a/emtests/test_strcmp_uni.out b/lib/emscripten/emtests/test_strcmp_uni.out similarity index 100% rename from emtests/test_strcmp_uni.out rename to lib/emscripten/emtests/test_strcmp_uni.out diff --git a/emtests/test_strcmp_uni.wasm b/lib/emscripten/emtests/test_strcmp_uni.wasm similarity index 100% rename from emtests/test_strcmp_uni.wasm rename to lib/emscripten/emtests/test_strcmp_uni.wasm diff --git a/emtests/test_strftime.cpp b/lib/emscripten/emtests/test_strftime.cpp similarity index 100% rename from emtests/test_strftime.cpp rename to lib/emscripten/emtests/test_strftime.cpp diff --git a/emtests/test_strftime.out b/lib/emscripten/emtests/test_strftime.out similarity index 100% rename from emtests/test_strftime.out rename to lib/emscripten/emtests/test_strftime.out diff --git a/emtests/test_strftime.wasm b/lib/emscripten/emtests/test_strftime.wasm similarity index 100% rename from emtests/test_strftime.wasm rename to lib/emscripten/emtests/test_strftime.wasm diff --git a/emtests/test_strings.c b/lib/emscripten/emtests/test_strings.c similarity index 100% rename from emtests/test_strings.c rename to lib/emscripten/emtests/test_strings.c diff --git a/emtests/test_strings.out b/lib/emscripten/emtests/test_strings.out similarity index 100% rename from emtests/test_strings.out rename to lib/emscripten/emtests/test_strings.out diff --git a/emtests/test_strings.wasm b/lib/emscripten/emtests/test_strings.wasm similarity index 100% rename from emtests/test_strings.wasm rename to lib/emscripten/emtests/test_strings.wasm diff --git a/emtests/test_strndup.c b/lib/emscripten/emtests/test_strndup.c similarity index 100% rename from emtests/test_strndup.c rename to lib/emscripten/emtests/test_strndup.c diff --git a/emtests/test_strndup.out b/lib/emscripten/emtests/test_strndup.out similarity index 100% rename from emtests/test_strndup.out rename to lib/emscripten/emtests/test_strndup.out diff --git a/emtests/test_strndup.wasm b/lib/emscripten/emtests/test_strndup.wasm similarity index 100% rename from emtests/test_strndup.wasm rename to lib/emscripten/emtests/test_strndup.wasm diff --git a/emtests/test_strptime_days.c b/lib/emscripten/emtests/test_strptime_days.c similarity index 100% rename from emtests/test_strptime_days.c rename to lib/emscripten/emtests/test_strptime_days.c diff --git a/emtests/test_strptime_days.out b/lib/emscripten/emtests/test_strptime_days.out similarity index 100% rename from emtests/test_strptime_days.out rename to lib/emscripten/emtests/test_strptime_days.out diff --git a/emtests/test_strptime_days.wasm b/lib/emscripten/emtests/test_strptime_days.wasm similarity index 100% rename from emtests/test_strptime_days.wasm rename to lib/emscripten/emtests/test_strptime_days.wasm diff --git a/emtests/test_strptime_reentrant.c b/lib/emscripten/emtests/test_strptime_reentrant.c similarity index 100% rename from emtests/test_strptime_reentrant.c rename to lib/emscripten/emtests/test_strptime_reentrant.c diff --git a/emtests/test_strptime_reentrant.out b/lib/emscripten/emtests/test_strptime_reentrant.out similarity index 100% rename from emtests/test_strptime_reentrant.out rename to lib/emscripten/emtests/test_strptime_reentrant.out diff --git a/emtests/test_strptime_reentrant.wasm b/lib/emscripten/emtests/test_strptime_reentrant.wasm similarity index 100% rename from emtests/test_strptime_reentrant.wasm rename to lib/emscripten/emtests/test_strptime_reentrant.wasm diff --git a/emtests/test_strptime_tm.c b/lib/emscripten/emtests/test_strptime_tm.c similarity index 100% rename from emtests/test_strptime_tm.c rename to lib/emscripten/emtests/test_strptime_tm.c diff --git a/emtests/test_strptime_tm.out b/lib/emscripten/emtests/test_strptime_tm.out similarity index 100% rename from emtests/test_strptime_tm.out rename to lib/emscripten/emtests/test_strptime_tm.out diff --git a/emtests/test_strstr.c b/lib/emscripten/emtests/test_strstr.c similarity index 100% rename from emtests/test_strstr.c rename to lib/emscripten/emtests/test_strstr.c diff --git a/emtests/test_strstr.out b/lib/emscripten/emtests/test_strstr.out similarity index 100% rename from emtests/test_strstr.out rename to lib/emscripten/emtests/test_strstr.out diff --git a/emtests/test_strstr.wasm b/lib/emscripten/emtests/test_strstr.wasm similarity index 100% rename from emtests/test_strstr.wasm rename to lib/emscripten/emtests/test_strstr.wasm diff --git a/emtests/test_strtod.c b/lib/emscripten/emtests/test_strtod.c similarity index 100% rename from emtests/test_strtod.c rename to lib/emscripten/emtests/test_strtod.c diff --git a/emtests/test_strtod.out b/lib/emscripten/emtests/test_strtod.out similarity index 100% rename from emtests/test_strtod.out rename to lib/emscripten/emtests/test_strtod.out diff --git a/emtests/test_strtod.wasm b/lib/emscripten/emtests/test_strtod.wasm similarity index 100% rename from emtests/test_strtod.wasm rename to lib/emscripten/emtests/test_strtod.wasm diff --git a/emtests/test_strtok.c b/lib/emscripten/emtests/test_strtok.c similarity index 100% rename from emtests/test_strtok.c rename to lib/emscripten/emtests/test_strtok.c diff --git a/emtests/test_strtok.out b/lib/emscripten/emtests/test_strtok.out similarity index 100% rename from emtests/test_strtok.out rename to lib/emscripten/emtests/test_strtok.out diff --git a/emtests/test_strtok.wasm b/lib/emscripten/emtests/test_strtok.wasm similarity index 100% rename from emtests/test_strtok.wasm rename to lib/emscripten/emtests/test_strtok.wasm diff --git a/emtests/test_strtol_bin.c b/lib/emscripten/emtests/test_strtol_bin.c similarity index 100% rename from emtests/test_strtol_bin.c rename to lib/emscripten/emtests/test_strtol_bin.c diff --git a/emtests/test_strtol_bin.out b/lib/emscripten/emtests/test_strtol_bin.out similarity index 100% rename from emtests/test_strtol_bin.out rename to lib/emscripten/emtests/test_strtol_bin.out diff --git a/emtests/test_strtol_bin.wasm b/lib/emscripten/emtests/test_strtol_bin.wasm similarity index 100% rename from emtests/test_strtol_bin.wasm rename to lib/emscripten/emtests/test_strtol_bin.wasm diff --git a/emtests/test_strtol_dec.c b/lib/emscripten/emtests/test_strtol_dec.c similarity index 100% rename from emtests/test_strtol_dec.c rename to lib/emscripten/emtests/test_strtol_dec.c diff --git a/emtests/test_strtol_dec.out b/lib/emscripten/emtests/test_strtol_dec.out similarity index 100% rename from emtests/test_strtol_dec.out rename to lib/emscripten/emtests/test_strtol_dec.out diff --git a/emtests/test_strtol_dec.wasm b/lib/emscripten/emtests/test_strtol_dec.wasm similarity index 100% rename from emtests/test_strtol_dec.wasm rename to lib/emscripten/emtests/test_strtol_dec.wasm diff --git a/emtests/test_strtol_hex.c b/lib/emscripten/emtests/test_strtol_hex.c similarity index 100% rename from emtests/test_strtol_hex.c rename to lib/emscripten/emtests/test_strtol_hex.c diff --git a/emtests/test_strtol_hex.out b/lib/emscripten/emtests/test_strtol_hex.out similarity index 100% rename from emtests/test_strtol_hex.out rename to lib/emscripten/emtests/test_strtol_hex.out diff --git a/emtests/test_strtol_hex.wasm b/lib/emscripten/emtests/test_strtol_hex.wasm similarity index 100% rename from emtests/test_strtol_hex.wasm rename to lib/emscripten/emtests/test_strtol_hex.wasm diff --git a/emtests/test_strtol_oct.c b/lib/emscripten/emtests/test_strtol_oct.c similarity index 100% rename from emtests/test_strtol_oct.c rename to lib/emscripten/emtests/test_strtol_oct.c diff --git a/emtests/test_strtol_oct.out b/lib/emscripten/emtests/test_strtol_oct.out similarity index 100% rename from emtests/test_strtol_oct.out rename to lib/emscripten/emtests/test_strtol_oct.out diff --git a/emtests/test_strtol_oct.wasm b/lib/emscripten/emtests/test_strtol_oct.wasm similarity index 100% rename from emtests/test_strtol_oct.wasm rename to lib/emscripten/emtests/test_strtol_oct.wasm diff --git a/emtests/test_strtold.c b/lib/emscripten/emtests/test_strtold.c similarity index 100% rename from emtests/test_strtold.c rename to lib/emscripten/emtests/test_strtold.c diff --git a/emtests/test_strtold.out b/lib/emscripten/emtests/test_strtold.out similarity index 100% rename from emtests/test_strtold.out rename to lib/emscripten/emtests/test_strtold.out diff --git a/emtests/test_strtold.wasm b/lib/emscripten/emtests/test_strtold.wasm similarity index 100% rename from emtests/test_strtold.wasm rename to lib/emscripten/emtests/test_strtold.wasm diff --git a/emtests/test_strtoll_bin.c b/lib/emscripten/emtests/test_strtoll_bin.c similarity index 100% rename from emtests/test_strtoll_bin.c rename to lib/emscripten/emtests/test_strtoll_bin.c diff --git a/emtests/test_strtoll_bin.out b/lib/emscripten/emtests/test_strtoll_bin.out similarity index 100% rename from emtests/test_strtoll_bin.out rename to lib/emscripten/emtests/test_strtoll_bin.out diff --git a/emtests/test_strtoll_bin.wasm b/lib/emscripten/emtests/test_strtoll_bin.wasm similarity index 100% rename from emtests/test_strtoll_bin.wasm rename to lib/emscripten/emtests/test_strtoll_bin.wasm diff --git a/emtests/test_strtoll_dec.c b/lib/emscripten/emtests/test_strtoll_dec.c similarity index 100% rename from emtests/test_strtoll_dec.c rename to lib/emscripten/emtests/test_strtoll_dec.c diff --git a/emtests/test_strtoll_dec.out b/lib/emscripten/emtests/test_strtoll_dec.out similarity index 100% rename from emtests/test_strtoll_dec.out rename to lib/emscripten/emtests/test_strtoll_dec.out diff --git a/emtests/test_strtoll_dec.wasm b/lib/emscripten/emtests/test_strtoll_dec.wasm similarity index 100% rename from emtests/test_strtoll_dec.wasm rename to lib/emscripten/emtests/test_strtoll_dec.wasm diff --git a/emtests/test_strtoll_hex.c b/lib/emscripten/emtests/test_strtoll_hex.c similarity index 100% rename from emtests/test_strtoll_hex.c rename to lib/emscripten/emtests/test_strtoll_hex.c diff --git a/emtests/test_strtoll_hex.out b/lib/emscripten/emtests/test_strtoll_hex.out similarity index 100% rename from emtests/test_strtoll_hex.out rename to lib/emscripten/emtests/test_strtoll_hex.out diff --git a/emtests/test_strtoll_hex.wasm b/lib/emscripten/emtests/test_strtoll_hex.wasm similarity index 100% rename from emtests/test_strtoll_hex.wasm rename to lib/emscripten/emtests/test_strtoll_hex.wasm diff --git a/emtests/test_strtoll_oct.c b/lib/emscripten/emtests/test_strtoll_oct.c similarity index 100% rename from emtests/test_strtoll_oct.c rename to lib/emscripten/emtests/test_strtoll_oct.c diff --git a/emtests/test_strtoll_oct.out b/lib/emscripten/emtests/test_strtoll_oct.out similarity index 100% rename from emtests/test_strtoll_oct.out rename to lib/emscripten/emtests/test_strtoll_oct.out diff --git a/emtests/test_strtoll_oct.wasm b/lib/emscripten/emtests/test_strtoll_oct.wasm similarity index 100% rename from emtests/test_strtoll_oct.wasm rename to lib/emscripten/emtests/test_strtoll_oct.wasm diff --git a/emtests/test_struct_varargs.c b/lib/emscripten/emtests/test_struct_varargs.c similarity index 100% rename from emtests/test_struct_varargs.c rename to lib/emscripten/emtests/test_struct_varargs.c diff --git a/emtests/test_struct_varargs.out b/lib/emscripten/emtests/test_struct_varargs.out similarity index 100% rename from emtests/test_struct_varargs.out rename to lib/emscripten/emtests/test_struct_varargs.out diff --git a/emtests/test_struct_varargs.wasm b/lib/emscripten/emtests/test_struct_varargs.wasm similarity index 100% rename from emtests/test_struct_varargs.wasm rename to lib/emscripten/emtests/test_struct_varargs.wasm diff --git a/emtests/test_structs.c b/lib/emscripten/emtests/test_structs.c similarity index 100% rename from emtests/test_structs.c rename to lib/emscripten/emtests/test_structs.c diff --git a/emtests/test_structs.out b/lib/emscripten/emtests/test_structs.out similarity index 100% rename from emtests/test_structs.out rename to lib/emscripten/emtests/test_structs.out diff --git a/emtests/test_time_c.c b/lib/emscripten/emtests/test_time_c.c similarity index 100% rename from emtests/test_time_c.c rename to lib/emscripten/emtests/test_time_c.c diff --git a/emtests/test_time_c.out b/lib/emscripten/emtests/test_time_c.out similarity index 100% rename from emtests/test_time_c.out rename to lib/emscripten/emtests/test_time_c.out diff --git a/emtests/test_time_c.wasm b/lib/emscripten/emtests/test_time_c.wasm similarity index 100% rename from emtests/test_time_c.wasm rename to lib/emscripten/emtests/test_time_c.wasm diff --git a/emtests/test_timeb.c b/lib/emscripten/emtests/test_timeb.c similarity index 100% rename from emtests/test_timeb.c rename to lib/emscripten/emtests/test_timeb.c diff --git a/emtests/test_timeb.out b/lib/emscripten/emtests/test_timeb.out similarity index 100% rename from emtests/test_timeb.out rename to lib/emscripten/emtests/test_timeb.out diff --git a/emtests/test_tinyfuncstr.c b/lib/emscripten/emtests/test_tinyfuncstr.c similarity index 100% rename from emtests/test_tinyfuncstr.c rename to lib/emscripten/emtests/test_tinyfuncstr.c diff --git a/emtests/test_tinyfuncstr.out b/lib/emscripten/emtests/test_tinyfuncstr.out similarity index 100% rename from emtests/test_tinyfuncstr.out rename to lib/emscripten/emtests/test_tinyfuncstr.out diff --git a/emtests/test_tracing.c b/lib/emscripten/emtests/test_tracing.c similarity index 100% rename from emtests/test_tracing.c rename to lib/emscripten/emtests/test_tracing.c diff --git a/emtests/test_tracing.out b/lib/emscripten/emtests/test_tracing.out similarity index 100% rename from emtests/test_tracing.out rename to lib/emscripten/emtests/test_tracing.out diff --git a/emtests/test_tracing.wasm b/lib/emscripten/emtests/test_tracing.wasm similarity index 100% rename from emtests/test_tracing.wasm rename to lib/emscripten/emtests/test_tracing.wasm diff --git a/emtests/test_transtrcase.c b/lib/emscripten/emtests/test_transtrcase.c similarity index 100% rename from emtests/test_transtrcase.c rename to lib/emscripten/emtests/test_transtrcase.c diff --git a/emtests/test_transtrcase.out b/lib/emscripten/emtests/test_transtrcase.out similarity index 100% rename from emtests/test_transtrcase.out rename to lib/emscripten/emtests/test_transtrcase.out diff --git a/emtests/test_transtrcase.wasm b/lib/emscripten/emtests/test_transtrcase.wasm similarity index 100% rename from emtests/test_transtrcase.wasm rename to lib/emscripten/emtests/test_transtrcase.wasm diff --git a/emtests/test_trickystring.c b/lib/emscripten/emtests/test_trickystring.c similarity index 100% rename from emtests/test_trickystring.c rename to lib/emscripten/emtests/test_trickystring.c diff --git a/emtests/test_trickystring.out b/lib/emscripten/emtests/test_trickystring.out similarity index 100% rename from emtests/test_trickystring.out rename to lib/emscripten/emtests/test_trickystring.out diff --git a/emtests/test_trickystring.wasm b/lib/emscripten/emtests/test_trickystring.wasm similarity index 100% rename from emtests/test_trickystring.wasm rename to lib/emscripten/emtests/test_trickystring.wasm diff --git a/emtests/test_typeid.c b/lib/emscripten/emtests/test_typeid.c similarity index 100% rename from emtests/test_typeid.c rename to lib/emscripten/emtests/test_typeid.c diff --git a/emtests/test_typeid.out b/lib/emscripten/emtests/test_typeid.out similarity index 100% rename from emtests/test_typeid.out rename to lib/emscripten/emtests/test_typeid.out diff --git a/emtests/test_uname.c b/lib/emscripten/emtests/test_uname.c similarity index 100% rename from emtests/test_uname.c rename to lib/emscripten/emtests/test_uname.c diff --git a/emtests/test_uname.out b/lib/emscripten/emtests/test_uname.out similarity index 100% rename from emtests/test_uname.out rename to lib/emscripten/emtests/test_uname.out diff --git a/emtests/test_uname.wasm b/lib/emscripten/emtests/test_uname.wasm similarity index 100% rename from emtests/test_uname.wasm rename to lib/emscripten/emtests/test_uname.wasm diff --git a/emtests/test_unary_literal.cpp b/lib/emscripten/emtests/test_unary_literal.cpp similarity index 100% rename from emtests/test_unary_literal.cpp rename to lib/emscripten/emtests/test_unary_literal.cpp diff --git a/emtests/test_unary_literal.out b/lib/emscripten/emtests/test_unary_literal.out similarity index 100% rename from emtests/test_unary_literal.out rename to lib/emscripten/emtests/test_unary_literal.out diff --git a/emtests/test_unary_literal.wasm b/lib/emscripten/emtests/test_unary_literal.wasm similarity index 100% rename from emtests/test_unary_literal.wasm rename to lib/emscripten/emtests/test_unary_literal.wasm diff --git a/emtests/test_utf.c b/lib/emscripten/emtests/test_utf.c similarity index 100% rename from emtests/test_utf.c rename to lib/emscripten/emtests/test_utf.c diff --git a/emtests/test_utf.out b/lib/emscripten/emtests/test_utf.out similarity index 100% rename from emtests/test_utf.out rename to lib/emscripten/emtests/test_utf.out diff --git a/emtests/test_utf.wasm b/lib/emscripten/emtests/test_utf.wasm similarity index 100% rename from emtests/test_utf.wasm rename to lib/emscripten/emtests/test_utf.wasm diff --git a/emtests/test_varargs.c b/lib/emscripten/emtests/test_varargs.c similarity index 100% rename from emtests/test_varargs.c rename to lib/emscripten/emtests/test_varargs.c diff --git a/emtests/test_varargs.out b/lib/emscripten/emtests/test_varargs.out similarity index 100% rename from emtests/test_varargs.out rename to lib/emscripten/emtests/test_varargs.out diff --git a/emtests/test_varargs.wasm b/lib/emscripten/emtests/test_varargs.wasm similarity index 100% rename from emtests/test_varargs.wasm rename to lib/emscripten/emtests/test_varargs.wasm diff --git a/emtests/test_varargs_multi.c b/lib/emscripten/emtests/test_varargs_multi.c similarity index 100% rename from emtests/test_varargs_multi.c rename to lib/emscripten/emtests/test_varargs_multi.c diff --git a/emtests/test_varargs_multi.out b/lib/emscripten/emtests/test_varargs_multi.out similarity index 100% rename from emtests/test_varargs_multi.out rename to lib/emscripten/emtests/test_varargs_multi.out diff --git a/emtests/test_varargs_multi.wasm b/lib/emscripten/emtests/test_varargs_multi.wasm similarity index 100% rename from emtests/test_varargs_multi.wasm rename to lib/emscripten/emtests/test_varargs_multi.wasm diff --git a/emtests/test_vprintf.c b/lib/emscripten/emtests/test_vprintf.c similarity index 100% rename from emtests/test_vprintf.c rename to lib/emscripten/emtests/test_vprintf.c diff --git a/emtests/test_vprintf.out b/lib/emscripten/emtests/test_vprintf.out similarity index 100% rename from emtests/test_vprintf.out rename to lib/emscripten/emtests/test_vprintf.out diff --git a/emtests/test_vprintf.wasm b/lib/emscripten/emtests/test_vprintf.wasm similarity index 100% rename from emtests/test_vprintf.wasm rename to lib/emscripten/emtests/test_vprintf.wasm diff --git a/emtests/test_vsnprintf.c b/lib/emscripten/emtests/test_vsnprintf.c similarity index 100% rename from emtests/test_vsnprintf.c rename to lib/emscripten/emtests/test_vsnprintf.c diff --git a/emtests/test_vsnprintf.out b/lib/emscripten/emtests/test_vsnprintf.out similarity index 100% rename from emtests/test_vsnprintf.out rename to lib/emscripten/emtests/test_vsnprintf.out diff --git a/emtests/test_vsnprintf.wasm b/lib/emscripten/emtests/test_vsnprintf.wasm similarity index 100% rename from emtests/test_vsnprintf.wasm rename to lib/emscripten/emtests/test_vsnprintf.wasm diff --git a/emtests/test_wprintf.cpp b/lib/emscripten/emtests/test_wprintf.cpp similarity index 100% rename from emtests/test_wprintf.cpp rename to lib/emscripten/emtests/test_wprintf.cpp diff --git a/emtests/test_wprintf.out b/lib/emscripten/emtests/test_wprintf.out similarity index 100% rename from emtests/test_wprintf.out rename to lib/emscripten/emtests/test_wprintf.out diff --git a/emtests/test_wprintf.wasm b/lib/emscripten/emtests/test_wprintf.wasm similarity index 100% rename from emtests/test_wprintf.wasm rename to lib/emscripten/emtests/test_wprintf.wasm diff --git a/emtests/test_write_stdout_fileno.c b/lib/emscripten/emtests/test_write_stdout_fileno.c similarity index 100% rename from emtests/test_write_stdout_fileno.c rename to lib/emscripten/emtests/test_write_stdout_fileno.c diff --git a/emtests/test_write_stdout_fileno.out b/lib/emscripten/emtests/test_write_stdout_fileno.out similarity index 100% rename from emtests/test_write_stdout_fileno.out rename to lib/emscripten/emtests/test_write_stdout_fileno.out diff --git a/emtests/test_write_stdout_fileno.wasm b/lib/emscripten/emtests/test_write_stdout_fileno.wasm similarity index 100% rename from emtests/test_write_stdout_fileno.wasm rename to lib/emscripten/emtests/test_write_stdout_fileno.wasm diff --git a/emtests/test_zero_multiplication.c b/lib/emscripten/emtests/test_zero_multiplication.c similarity index 100% rename from emtests/test_zero_multiplication.c rename to lib/emscripten/emtests/test_zero_multiplication.c diff --git a/emtests/test_zero_multiplication.out b/lib/emscripten/emtests/test_zero_multiplication.out similarity index 100% rename from emtests/test_zero_multiplication.out rename to lib/emscripten/emtests/test_zero_multiplication.out diff --git a/emtests/test_zero_multiplication.wasm b/lib/emscripten/emtests/test_zero_multiplication.wasm similarity index 100% rename from emtests/test_zero_multiplication.wasm rename to lib/emscripten/emtests/test_zero_multiplication.wasm diff --git a/emtests/test_zerodiv.c b/lib/emscripten/emtests/test_zerodiv.c similarity index 100% rename from emtests/test_zerodiv.c rename to lib/emscripten/emtests/test_zerodiv.c diff --git a/emtests/test_zerodiv.out b/lib/emscripten/emtests/test_zerodiv.out similarity index 100% rename from emtests/test_zerodiv.out rename to lib/emscripten/emtests/test_zerodiv.out diff --git a/emtests/test_zerodiv.wasm b/lib/emscripten/emtests/test_zerodiv.wasm similarity index 100% rename from emtests/test_zerodiv.wasm rename to lib/emscripten/emtests/test_zerodiv.wasm diff --git a/src/apis/emscripten/README.md b/lib/emscripten/src/README.md similarity index 100% rename from src/apis/emscripten/README.md rename to lib/emscripten/src/README.md diff --git a/src/apis/emscripten/env.rs b/lib/emscripten/src/env.rs similarity index 99% rename from src/apis/emscripten/env.rs rename to lib/emscripten/src/env.rs index f5acfac23..bd4c4e79f 100644 --- a/src/apis/emscripten/env.rs +++ b/lib/emscripten/src/env.rs @@ -8,7 +8,7 @@ use std::mem; use std::os::raw::c_char; use super::utils::{allocate_on_stack, copy_cstr_into_wasm, copy_terminated_array_of_cstrs}; -use crate::apis::emscripten::EmscriptenData; +use super::EmscriptenData; use wasmer_runtime::{types::Value, Instance}; //impl Instance { diff --git a/src/apis/emscripten/errno.rs b/lib/emscripten/src/errno.rs similarity index 100% rename from src/apis/emscripten/errno.rs rename to lib/emscripten/src/errno.rs diff --git a/src/apis/emscripten/exception.rs b/lib/emscripten/src/exception.rs similarity index 93% rename from src/apis/emscripten/exception.rs rename to lib/emscripten/src/exception.rs index ab7c86793..4244c3005 100644 --- a/src/apis/emscripten/exception.rs +++ b/lib/emscripten/src/exception.rs @@ -1,5 +1,5 @@ use super::process::_abort; -use crate::apis::emscripten::env; +use super::env; use wasmer_runtime::Instance; /// emscripten: ___cxa_allocate_exception diff --git a/src/apis/emscripten/io.rs b/lib/emscripten/src/io.rs similarity index 100% rename from src/apis/emscripten/io.rs rename to lib/emscripten/src/io.rs diff --git a/src/apis/emscripten/jmp.rs b/lib/emscripten/src/jmp.rs similarity index 100% rename from src/apis/emscripten/jmp.rs rename to lib/emscripten/src/jmp.rs diff --git a/src/apis/emscripten/mod.rs b/lib/emscripten/src/lib.rs similarity index 99% rename from src/apis/emscripten/mod.rs rename to lib/emscripten/src/lib.rs index 60660d018..6d8a7fe67 100644 --- a/src/apis/emscripten/mod.rs +++ b/lib/emscripten/src/lib.rs @@ -1,3 +1,6 @@ +#[macro_use] +extern crate wasmer_runtime; + use wasmer_runtime::LinearMemory; use wasmer_runtime::types::{FuncSig, Type, Value}; use wasmer_runtime::{Import, Imports, Instance, FuncRef}; diff --git a/src/apis/emscripten/linking.rs b/lib/emscripten/src/linking.rs similarity index 100% rename from src/apis/emscripten/linking.rs rename to lib/emscripten/src/linking.rs diff --git a/src/apis/emscripten/lock.rs b/lib/emscripten/src/lock.rs similarity index 100% rename from src/apis/emscripten/lock.rs rename to lib/emscripten/src/lock.rs diff --git a/src/apis/emscripten/math.rs b/lib/emscripten/src/math.rs similarity index 100% rename from src/apis/emscripten/math.rs rename to lib/emscripten/src/math.rs diff --git a/src/apis/emscripten/memory.rs b/lib/emscripten/src/memory.rs similarity index 100% rename from src/apis/emscripten/memory.rs rename to lib/emscripten/src/memory.rs diff --git a/src/apis/emscripten/nullfunc.rs b/lib/emscripten/src/nullfunc.rs similarity index 100% rename from src/apis/emscripten/nullfunc.rs rename to lib/emscripten/src/nullfunc.rs diff --git a/src/apis/emscripten/process.rs b/lib/emscripten/src/process.rs similarity index 100% rename from src/apis/emscripten/process.rs rename to lib/emscripten/src/process.rs diff --git a/src/apis/emscripten/signal.rs b/lib/emscripten/src/signal.rs similarity index 100% rename from src/apis/emscripten/signal.rs rename to lib/emscripten/src/signal.rs diff --git a/src/apis/emscripten/storage.rs b/lib/emscripten/src/storage.rs similarity index 100% rename from src/apis/emscripten/storage.rs rename to lib/emscripten/src/storage.rs diff --git a/src/apis/emscripten/syscalls.rs b/lib/emscripten/src/syscalls.rs similarity index 99% rename from src/apis/emscripten/syscalls.rs rename to lib/emscripten/src/syscalls.rs index 7d1eddc79..0b20c97f8 100644 --- a/src/apis/emscripten/syscalls.rs +++ b/lib/emscripten/src/syscalls.rs @@ -71,7 +71,7 @@ use libc::{ TIOCGWINSZ, }; -use crate::apis::emscripten::env; +use super::env; use std::mem; use std::slice; // use std::sys::fd::FileDesc; diff --git a/src/apis/emscripten/tests/is_emscripten_false.wast b/lib/emscripten/src/tests/is_emscripten_false.wast similarity index 100% rename from src/apis/emscripten/tests/is_emscripten_false.wast rename to lib/emscripten/src/tests/is_emscripten_false.wast diff --git a/src/apis/emscripten/tests/is_emscripten_true.wast b/lib/emscripten/src/tests/is_emscripten_true.wast similarity index 100% rename from src/apis/emscripten/tests/is_emscripten_true.wast rename to lib/emscripten/src/tests/is_emscripten_true.wast diff --git a/src/apis/emscripten/time.rs b/lib/emscripten/src/time.rs similarity index 99% rename from src/apis/emscripten/time.rs rename to lib/emscripten/src/time.rs index fe3c382a0..d2aa6cd79 100644 --- a/src/apis/emscripten/time.rs +++ b/lib/emscripten/src/time.rs @@ -5,7 +5,7 @@ use std::time::SystemTime; use time; -use crate::apis::emscripten::env; +use super::env; use wasmer_runtime::Instance; #[cfg(target_os = "linux")] diff --git a/src/apis/emscripten/utils.rs b/lib/emscripten/src/utils.rs similarity index 86% rename from src/apis/emscripten/utils.rs rename to lib/emscripten/src/utils.rs index ea6944a28..2feffa79a 100644 --- a/src/apis/emscripten/utils.rs +++ b/lib/emscripten/src/utils.rs @@ -1,6 +1,6 @@ use wasmer_runtime::{Instance, module::Module}; //use wasmer_runtime::Instance; -use crate::apis::emscripten::env; +use super::env; use libc::stat; use std::ffi::CStr; use std::mem::size_of; @@ -141,19 +141,22 @@ pub unsafe fn copy_stat_into_wasm(instance: &mut Instance, buf: u32, stat: &stat #[cfg(test)] mod tests { use super::is_emscripten_module; - use crate::webassembly::compile; + use wasmer_clif_backend::CraneliftCompiler; + use wabt::wat2wasm; #[test] fn should_detect_emscripten_files() { - let wasm_bytes = include_wast2wasm_bytes!("tests/is_emscripten_true.wast"); - let module = compile(&wasm_bytes).expect("Not compiled properly"); + const wast_bytes: &[u8] = include_bytes!("tests/is_emscripten_true.wast"); + let wasm_binary = wat2wasm(wast_bytes.to_vec()).expect("Can't convert to wasm"); + let module = wasmer_runtime::compile(&wasm_binary[..], &CraneliftCompiler::new()).expect("WASM can't be compiled"); assert!(is_emscripten_module(&module)); } #[test] fn should_detect_non_emscripten_files() { - let wasm_bytes = include_wast2wasm_bytes!("tests/is_emscripten_false.wast"); - let module = compile(&wasm_bytes).expect("Not compiled properly"); + const wast_bytes: &[u8] = include_bytes!("tests/is_emscripten_false.wast"); + let wasm_binary = wat2wasm(wast_bytes.to_vec()).expect("Can't convert to wasm"); + let module = wasmer_runtime::compile(&wasm_binary[..], &CraneliftCompiler::new()).expect("WASM can't be compiled"); assert!(!is_emscripten_module(&module)); } } diff --git a/src/apis/emscripten/varargs.rs b/lib/emscripten/src/varargs.rs similarity index 100% rename from src/apis/emscripten/varargs.rs rename to lib/emscripten/src/varargs.rs diff --git a/lib/emscripten/tests/emtest.rs b/lib/emscripten/tests/emtest.rs new file mode 100644 index 000000000..d8a255bce --- /dev/null +++ b/lib/emscripten/tests/emtest.rs @@ -0,0 +1 @@ +mod emtests; diff --git a/lib/emscripten/tests/emtests/_common.rs b/lib/emscripten/tests/emtests/_common.rs new file mode 100644 index 000000000..594280047 --- /dev/null +++ b/lib/emscripten/tests/emtests/_common.rs @@ -0,0 +1,46 @@ +macro_rules! assert_emscripten_output { + ($file:expr, $name:expr, $args:expr, $expected:expr) => {{ + use wasmer_emscripten::generate_emscripten_env; + // use wasmer::common::stdio::StdioCapturer; + use wasmer_runtime::{Import, Imports, FuncRef}; + use wasmer_runtime::table::TableBacking; + use wasmer_runtime::{Instance, module::Module}; + use wasmer_clif_backend::CraneliftCompiler; + + use std::sync::Arc; + + let wasm_bytes = include_bytes!($file); + let import_object = generate_emscripten_env(); +// let options = Some(InstanceOptions { +// mock_missing_imports: true, +// mock_missing_globals: true, +// mock_missing_tables: true, +// abi: InstanceABI::Emscripten, +// show_progressbar: false, +// // isa: get_isa(), +// }); +// let mut result_object = instantiate(&wasm_bytes.to_vec(), &import_object, options) +// .expect("Not compiled properly"); + + let module = wasmer_runtime::compile(&wasm_bytes[..], &CraneliftCompiler::new()).expect("WASM can't be compiled"); + let instance = module.instantiate(&import_object).expect("WASM can't be instantiated"); + + // let capturer = StdioCapturer::new(); + // start_instance( + // Arc::clone(&result_object.module), + // &mut result_object.instance, + // $name, + // $args, + // ) + // .unwrap(); + // let output = capturer.end().unwrap().0; + // let expected_output = include_str!($expected); + assert!(false, "Emscripten tests are mocked"); + // assert!( + // output.contains(expected_output), + // "Output: `{}` does not contain expected output: `{}`", + // output, + // expected_output + // ); + }}; +} diff --git a/src/emtests/clock_gettime.rs b/lib/emscripten/tests/emtests/clock_gettime.rs similarity index 100% rename from src/emtests/clock_gettime.rs rename to lib/emscripten/tests/emtests/clock_gettime.rs diff --git a/src/emtests/emscripten_get_compiler_setting.rs b/lib/emscripten/tests/emtests/emscripten_get_compiler_setting.rs similarity index 100% rename from src/emtests/emscripten_get_compiler_setting.rs rename to lib/emscripten/tests/emtests/emscripten_get_compiler_setting.rs diff --git a/src/emtests/env.rs b/lib/emscripten/tests/emtests/env.rs similarity index 100% rename from src/emtests/env.rs rename to lib/emscripten/tests/emtests/env.rs diff --git a/src/emtests/fs_exports.rs b/lib/emscripten/tests/emtests/fs_exports.rs similarity index 100% rename from src/emtests/fs_exports.rs rename to lib/emscripten/tests/emtests/fs_exports.rs diff --git a/src/emtests/getvalue_setvalue.rs b/lib/emscripten/tests/emtests/getvalue_setvalue.rs similarity index 100% rename from src/emtests/getvalue_setvalue.rs rename to lib/emscripten/tests/emtests/getvalue_setvalue.rs diff --git a/src/emtests/legacy_exported_runtime_numbers.rs b/lib/emscripten/tests/emtests/legacy_exported_runtime_numbers.rs similarity index 100% rename from src/emtests/legacy_exported_runtime_numbers.rs rename to lib/emscripten/tests/emtests/legacy_exported_runtime_numbers.rs diff --git a/src/emtests/localtime.rs b/lib/emscripten/tests/emtests/localtime.rs similarity index 100% rename from src/emtests/localtime.rs rename to lib/emscripten/tests/emtests/localtime.rs diff --git a/src/emtests/mod.rs b/lib/emscripten/tests/emtests/mod.rs similarity index 100% rename from src/emtests/mod.rs rename to lib/emscripten/tests/emtests/mod.rs diff --git a/src/emtests/modularize_closure_pre.rs b/lib/emscripten/tests/emtests/modularize_closure_pre.rs similarity index 100% rename from src/emtests/modularize_closure_pre.rs rename to lib/emscripten/tests/emtests/modularize_closure_pre.rs diff --git a/src/emtests/printf.rs b/lib/emscripten/tests/emtests/printf.rs similarity index 100% rename from src/emtests/printf.rs rename to lib/emscripten/tests/emtests/printf.rs diff --git a/src/emtests/puts.rs b/lib/emscripten/tests/emtests/puts.rs similarity index 100% rename from src/emtests/puts.rs rename to lib/emscripten/tests/emtests/puts.rs diff --git a/src/emtests/stackalloc.rs b/lib/emscripten/tests/emtests/stackalloc.rs similarity index 100% rename from src/emtests/stackalloc.rs rename to lib/emscripten/tests/emtests/stackalloc.rs diff --git a/src/emtests/syscalls.rs b/lib/emscripten/tests/emtests/syscalls.rs similarity index 100% rename from src/emtests/syscalls.rs rename to lib/emscripten/tests/emtests/syscalls.rs diff --git a/src/emtests/test_addr_of_stacked.rs b/lib/emscripten/tests/emtests/test_addr_of_stacked.rs similarity index 100% rename from src/emtests/test_addr_of_stacked.rs rename to lib/emscripten/tests/emtests/test_addr_of_stacked.rs diff --git a/src/emtests/test_alloca.rs b/lib/emscripten/tests/emtests/test_alloca.rs similarity index 100% rename from src/emtests/test_alloca.rs rename to lib/emscripten/tests/emtests/test_alloca.rs diff --git a/src/emtests/test_alloca_stack.rs b/lib/emscripten/tests/emtests/test_alloca_stack.rs similarity index 100% rename from src/emtests/test_alloca_stack.rs rename to lib/emscripten/tests/emtests/test_alloca_stack.rs diff --git a/src/emtests/test_array2.rs b/lib/emscripten/tests/emtests/test_array2.rs similarity index 100% rename from src/emtests/test_array2.rs rename to lib/emscripten/tests/emtests/test_array2.rs diff --git a/src/emtests/test_array2b.rs b/lib/emscripten/tests/emtests/test_array2b.rs similarity index 100% rename from src/emtests/test_array2b.rs rename to lib/emscripten/tests/emtests/test_array2b.rs diff --git a/src/emtests/test_atomic.rs b/lib/emscripten/tests/emtests/test_atomic.rs similarity index 100% rename from src/emtests/test_atomic.rs rename to lib/emscripten/tests/emtests/test_atomic.rs diff --git a/src/emtests/test_atox.rs b/lib/emscripten/tests/emtests/test_atox.rs similarity index 100% rename from src/emtests/test_atox.rs rename to lib/emscripten/tests/emtests/test_atox.rs diff --git a/src/emtests/test_bsearch.rs b/lib/emscripten/tests/emtests/test_bsearch.rs similarity index 100% rename from src/emtests/test_bsearch.rs rename to lib/emscripten/tests/emtests/test_bsearch.rs diff --git a/src/emtests/test_ccall.rs b/lib/emscripten/tests/emtests/test_ccall.rs similarity index 100% rename from src/emtests/test_ccall.rs rename to lib/emscripten/tests/emtests/test_ccall.rs diff --git a/src/emtests/test_complex.rs b/lib/emscripten/tests/emtests/test_complex.rs similarity index 100% rename from src/emtests/test_complex.rs rename to lib/emscripten/tests/emtests/test_complex.rs diff --git a/src/emtests/test_demangle_stacks.rs b/lib/emscripten/tests/emtests/test_demangle_stacks.rs similarity index 100% rename from src/emtests/test_demangle_stacks.rs rename to lib/emscripten/tests/emtests/test_demangle_stacks.rs diff --git a/src/emtests/test_demangle_stacks_noassert.rs b/lib/emscripten/tests/emtests/test_demangle_stacks_noassert.rs similarity index 100% rename from src/emtests/test_demangle_stacks_noassert.rs rename to lib/emscripten/tests/emtests/test_demangle_stacks_noassert.rs diff --git a/src/emtests/test_dlmalloc_partial_2.rs b/lib/emscripten/tests/emtests/test_dlmalloc_partial_2.rs similarity index 100% rename from src/emtests/test_dlmalloc_partial_2.rs rename to lib/emscripten/tests/emtests/test_dlmalloc_partial_2.rs diff --git a/src/emtests/test_double_varargs.rs b/lib/emscripten/tests/emtests/test_double_varargs.rs similarity index 100% rename from src/emtests/test_double_varargs.rs rename to lib/emscripten/tests/emtests/test_double_varargs.rs diff --git a/src/emtests/test_em_asm.rs b/lib/emscripten/tests/emtests/test_em_asm.rs similarity index 100% rename from src/emtests/test_em_asm.rs rename to lib/emscripten/tests/emtests/test_em_asm.rs diff --git a/src/emtests/test_em_asm_2.rs b/lib/emscripten/tests/emtests/test_em_asm_2.rs similarity index 100% rename from src/emtests/test_em_asm_2.rs rename to lib/emscripten/tests/emtests/test_em_asm_2.rs diff --git a/src/emtests/test_em_asm_parameter_pack.rs b/lib/emscripten/tests/emtests/test_em_asm_parameter_pack.rs similarity index 100% rename from src/emtests/test_em_asm_parameter_pack.rs rename to lib/emscripten/tests/emtests/test_em_asm_parameter_pack.rs diff --git a/src/emtests/test_em_asm_signatures.rs b/lib/emscripten/tests/emtests/test_em_asm_signatures.rs similarity index 100% rename from src/emtests/test_em_asm_signatures.rs rename to lib/emscripten/tests/emtests/test_em_asm_signatures.rs diff --git a/src/emtests/test_em_asm_unicode.rs b/lib/emscripten/tests/emtests/test_em_asm_unicode.rs similarity index 100% rename from src/emtests/test_em_asm_unicode.rs rename to lib/emscripten/tests/emtests/test_em_asm_unicode.rs diff --git a/src/emtests/test_em_asm_unused_arguments.rs b/lib/emscripten/tests/emtests/test_em_asm_unused_arguments.rs similarity index 100% rename from src/emtests/test_em_asm_unused_arguments.rs rename to lib/emscripten/tests/emtests/test_em_asm_unused_arguments.rs diff --git a/src/emtests/test_em_js.rs b/lib/emscripten/tests/emtests/test_em_js.rs similarity index 100% rename from src/emtests/test_em_js.rs rename to lib/emscripten/tests/emtests/test_em_js.rs diff --git a/src/emtests/test_emscripten_api.rs b/lib/emscripten/tests/emtests/test_emscripten_api.rs similarity index 100% rename from src/emtests/test_emscripten_api.rs rename to lib/emscripten/tests/emtests/test_emscripten_api.rs diff --git a/src/emtests/test_erf.rs b/lib/emscripten/tests/emtests/test_erf.rs similarity index 100% rename from src/emtests/test_erf.rs rename to lib/emscripten/tests/emtests/test_erf.rs diff --git a/src/emtests/test_errar.rs b/lib/emscripten/tests/emtests/test_errar.rs similarity index 100% rename from src/emtests/test_errar.rs rename to lib/emscripten/tests/emtests/test_errar.rs diff --git a/src/emtests/test_exceptions_2.rs b/lib/emscripten/tests/emtests/test_exceptions_2.rs similarity index 100% rename from src/emtests/test_exceptions_2.rs rename to lib/emscripten/tests/emtests/test_exceptions_2.rs diff --git a/src/emtests/test_exceptions_multi.rs b/lib/emscripten/tests/emtests/test_exceptions_multi.rs similarity index 100% rename from src/emtests/test_exceptions_multi.rs rename to lib/emscripten/tests/emtests/test_exceptions_multi.rs diff --git a/src/emtests/test_exceptions_std.rs b/lib/emscripten/tests/emtests/test_exceptions_std.rs similarity index 100% rename from src/emtests/test_exceptions_std.rs rename to lib/emscripten/tests/emtests/test_exceptions_std.rs diff --git a/src/emtests/test_exceptions_white_list.rs b/lib/emscripten/tests/emtests/test_exceptions_white_list.rs similarity index 100% rename from src/emtests/test_exceptions_white_list.rs rename to lib/emscripten/tests/emtests/test_exceptions_white_list.rs diff --git a/src/emtests/test_fast_math.rs b/lib/emscripten/tests/emtests/test_fast_math.rs similarity index 100% rename from src/emtests/test_fast_math.rs rename to lib/emscripten/tests/emtests/test_fast_math.rs diff --git a/src/emtests/test_flexarray_struct.rs b/lib/emscripten/tests/emtests/test_flexarray_struct.rs similarity index 100% rename from src/emtests/test_flexarray_struct.rs rename to lib/emscripten/tests/emtests/test_flexarray_struct.rs diff --git a/src/emtests/test_float32_precise.rs b/lib/emscripten/tests/emtests/test_float32_precise.rs similarity index 100% rename from src/emtests/test_float32_precise.rs rename to lib/emscripten/tests/emtests/test_float32_precise.rs diff --git a/src/emtests/test_float_builtins.rs b/lib/emscripten/tests/emtests/test_float_builtins.rs similarity index 100% rename from src/emtests/test_float_builtins.rs rename to lib/emscripten/tests/emtests/test_float_builtins.rs diff --git a/src/emtests/test_frexp.rs b/lib/emscripten/tests/emtests/test_frexp.rs similarity index 100% rename from src/emtests/test_frexp.rs rename to lib/emscripten/tests/emtests/test_frexp.rs diff --git a/src/emtests/test_funcptr.rs b/lib/emscripten/tests/emtests/test_funcptr.rs similarity index 100% rename from src/emtests/test_funcptr.rs rename to lib/emscripten/tests/emtests/test_funcptr.rs diff --git a/src/emtests/test_funcptr_namecollide.rs b/lib/emscripten/tests/emtests/test_funcptr_namecollide.rs similarity index 100% rename from src/emtests/test_funcptr_namecollide.rs rename to lib/emscripten/tests/emtests/test_funcptr_namecollide.rs diff --git a/src/emtests/test_funcptrfunc.rs b/lib/emscripten/tests/emtests/test_funcptrfunc.rs similarity index 100% rename from src/emtests/test_funcptrfunc.rs rename to lib/emscripten/tests/emtests/test_funcptrfunc.rs diff --git a/src/emtests/test_funcs.rs b/lib/emscripten/tests/emtests/test_funcs.rs similarity index 100% rename from src/emtests/test_funcs.rs rename to lib/emscripten/tests/emtests/test_funcs.rs diff --git a/src/emtests/test_functionpointer_libfunc_varargs.rs b/lib/emscripten/tests/emtests/test_functionpointer_libfunc_varargs.rs similarity index 100% rename from src/emtests/test_functionpointer_libfunc_varargs.rs rename to lib/emscripten/tests/emtests/test_functionpointer_libfunc_varargs.rs diff --git a/src/emtests/test_fwrite_0.rs b/lib/emscripten/tests/emtests/test_fwrite_0.rs similarity index 100% rename from src/emtests/test_fwrite_0.rs rename to lib/emscripten/tests/emtests/test_fwrite_0.rs diff --git a/src/emtests/test_getgep.rs b/lib/emscripten/tests/emtests/test_getgep.rs similarity index 100% rename from src/emtests/test_getgep.rs rename to lib/emscripten/tests/emtests/test_getgep.rs diff --git a/src/emtests/test_getloadavg.rs b/lib/emscripten/tests/emtests/test_getloadavg.rs similarity index 100% rename from src/emtests/test_getloadavg.rs rename to lib/emscripten/tests/emtests/test_getloadavg.rs diff --git a/src/emtests/test_getopt.rs b/lib/emscripten/tests/emtests/test_getopt.rs similarity index 100% rename from src/emtests/test_getopt.rs rename to lib/emscripten/tests/emtests/test_getopt.rs diff --git a/src/emtests/test_getopt_long.rs b/lib/emscripten/tests/emtests/test_getopt_long.rs similarity index 100% rename from src/emtests/test_getopt_long.rs rename to lib/emscripten/tests/emtests/test_getopt_long.rs diff --git a/src/emtests/test_globaldoubles.rs b/lib/emscripten/tests/emtests/test_globaldoubles.rs similarity index 100% rename from src/emtests/test_globaldoubles.rs rename to lib/emscripten/tests/emtests/test_globaldoubles.rs diff --git a/src/emtests/test_globals.rs b/lib/emscripten/tests/emtests/test_globals.rs similarity index 100% rename from src/emtests/test_globals.rs rename to lib/emscripten/tests/emtests/test_globals.rs diff --git a/src/emtests/test_gmtime.rs b/lib/emscripten/tests/emtests/test_gmtime.rs similarity index 100% rename from src/emtests/test_gmtime.rs rename to lib/emscripten/tests/emtests/test_gmtime.rs diff --git a/src/emtests/test_hello_world.rs b/lib/emscripten/tests/emtests/test_hello_world.rs similarity index 100% rename from src/emtests/test_hello_world.rs rename to lib/emscripten/tests/emtests/test_hello_world.rs diff --git a/src/emtests/test_i16_emcc_intrinsic.rs b/lib/emscripten/tests/emtests/test_i16_emcc_intrinsic.rs similarity index 100% rename from src/emtests/test_i16_emcc_intrinsic.rs rename to lib/emscripten/tests/emtests/test_i16_emcc_intrinsic.rs diff --git a/src/emtests/test_i32_mul_precise.rs b/lib/emscripten/tests/emtests/test_i32_mul_precise.rs similarity index 100% rename from src/emtests/test_i32_mul_precise.rs rename to lib/emscripten/tests/emtests/test_i32_mul_precise.rs diff --git a/src/emtests/test_i64.rs b/lib/emscripten/tests/emtests/test_i64.rs similarity index 100% rename from src/emtests/test_i64.rs rename to lib/emscripten/tests/emtests/test_i64.rs diff --git a/src/emtests/test_i64_4.rs b/lib/emscripten/tests/emtests/test_i64_4.rs similarity index 100% rename from src/emtests/test_i64_4.rs rename to lib/emscripten/tests/emtests/test_i64_4.rs diff --git a/src/emtests/test_i64_7z.rs b/lib/emscripten/tests/emtests/test_i64_7z.rs similarity index 100% rename from src/emtests/test_i64_7z.rs rename to lib/emscripten/tests/emtests/test_i64_7z.rs diff --git a/src/emtests/test_i64_cmp2.rs b/lib/emscripten/tests/emtests/test_i64_cmp2.rs similarity index 100% rename from src/emtests/test_i64_cmp2.rs rename to lib/emscripten/tests/emtests/test_i64_cmp2.rs diff --git a/src/emtests/test_i64_i16.rs b/lib/emscripten/tests/emtests/test_i64_i16.rs similarity index 100% rename from src/emtests/test_i64_i16.rs rename to lib/emscripten/tests/emtests/test_i64_i16.rs diff --git a/src/emtests/test_i64_llabs.rs b/lib/emscripten/tests/emtests/test_i64_llabs.rs similarity index 100% rename from src/emtests/test_i64_llabs.rs rename to lib/emscripten/tests/emtests/test_i64_llabs.rs diff --git a/src/emtests/test_i64_precise.rs b/lib/emscripten/tests/emtests/test_i64_precise.rs similarity index 100% rename from src/emtests/test_i64_precise.rs rename to lib/emscripten/tests/emtests/test_i64_precise.rs diff --git a/src/emtests/test_i64_precise_needed.rs b/lib/emscripten/tests/emtests/test_i64_precise_needed.rs similarity index 100% rename from src/emtests/test_i64_precise_needed.rs rename to lib/emscripten/tests/emtests/test_i64_precise_needed.rs diff --git a/src/emtests/test_i64_precise_unneeded.rs b/lib/emscripten/tests/emtests/test_i64_precise_unneeded.rs similarity index 100% rename from src/emtests/test_i64_precise_unneeded.rs rename to lib/emscripten/tests/emtests/test_i64_precise_unneeded.rs diff --git a/src/emtests/test_i64_qdouble.rs b/lib/emscripten/tests/emtests/test_i64_qdouble.rs similarity index 100% rename from src/emtests/test_i64_qdouble.rs rename to lib/emscripten/tests/emtests/test_i64_qdouble.rs diff --git a/src/emtests/test_i64_umul.rs b/lib/emscripten/tests/emtests/test_i64_umul.rs similarity index 100% rename from src/emtests/test_i64_umul.rs rename to lib/emscripten/tests/emtests/test_i64_umul.rs diff --git a/src/emtests/test_i64_varargs.rs b/lib/emscripten/tests/emtests/test_i64_varargs.rs similarity index 100% rename from src/emtests/test_i64_varargs.rs rename to lib/emscripten/tests/emtests/test_i64_varargs.rs diff --git a/src/emtests/test_i64_zextneg.rs b/lib/emscripten/tests/emtests/test_i64_zextneg.rs similarity index 100% rename from src/emtests/test_i64_zextneg.rs rename to lib/emscripten/tests/emtests/test_i64_zextneg.rs diff --git a/src/emtests/test_if.rs b/lib/emscripten/tests/emtests/test_if.rs similarity index 100% rename from src/emtests/test_if.rs rename to lib/emscripten/tests/emtests/test_if.rs diff --git a/src/emtests/test_if_else.rs b/lib/emscripten/tests/emtests/test_if_else.rs similarity index 100% rename from src/emtests/test_if_else.rs rename to lib/emscripten/tests/emtests/test_if_else.rs diff --git a/src/emtests/test_indirectbr.rs b/lib/emscripten/tests/emtests/test_indirectbr.rs similarity index 100% rename from src/emtests/test_indirectbr.rs rename to lib/emscripten/tests/emtests/test_indirectbr.rs diff --git a/src/emtests/test_indirectbr_many.rs b/lib/emscripten/tests/emtests/test_indirectbr_many.rs similarity index 100% rename from src/emtests/test_indirectbr_many.rs rename to lib/emscripten/tests/emtests/test_indirectbr_many.rs diff --git a/src/emtests/test_isnan.rs b/lib/emscripten/tests/emtests/test_isnan.rs similarity index 100% rename from src/emtests/test_isnan.rs rename to lib/emscripten/tests/emtests/test_isnan.rs diff --git a/src/emtests/test_libcextra.rs b/lib/emscripten/tests/emtests/test_libcextra.rs similarity index 100% rename from src/emtests/test_libcextra.rs rename to lib/emscripten/tests/emtests/test_libcextra.rs diff --git a/src/emtests/test_libgen.rs b/lib/emscripten/tests/emtests/test_libgen.rs similarity index 100% rename from src/emtests/test_libgen.rs rename to lib/emscripten/tests/emtests/test_libgen.rs diff --git a/src/emtests/test_literal_negative_zero.rs b/lib/emscripten/tests/emtests/test_literal_negative_zero.rs similarity index 100% rename from src/emtests/test_literal_negative_zero.rs rename to lib/emscripten/tests/emtests/test_literal_negative_zero.rs diff --git a/src/emtests/test_llrint.rs b/lib/emscripten/tests/emtests/test_llrint.rs similarity index 100% rename from src/emtests/test_llrint.rs rename to lib/emscripten/tests/emtests/test_llrint.rs diff --git a/src/emtests/test_llvm_fabs.rs b/lib/emscripten/tests/emtests/test_llvm_fabs.rs similarity index 100% rename from src/emtests/test_llvm_fabs.rs rename to lib/emscripten/tests/emtests/test_llvm_fabs.rs diff --git a/src/emtests/test_llvm_intrinsics.rs b/lib/emscripten/tests/emtests/test_llvm_intrinsics.rs similarity index 100% rename from src/emtests/test_llvm_intrinsics.rs rename to lib/emscripten/tests/emtests/test_llvm_intrinsics.rs diff --git a/src/emtests/test_llvmswitch.rs b/lib/emscripten/tests/emtests/test_llvmswitch.rs similarity index 100% rename from src/emtests/test_llvmswitch.rs rename to lib/emscripten/tests/emtests/test_llvmswitch.rs diff --git a/src/emtests/test_longjmp.rs b/lib/emscripten/tests/emtests/test_longjmp.rs similarity index 100% rename from src/emtests/test_longjmp.rs rename to lib/emscripten/tests/emtests/test_longjmp.rs diff --git a/src/emtests/test_longjmp2.rs b/lib/emscripten/tests/emtests/test_longjmp2.rs similarity index 100% rename from src/emtests/test_longjmp2.rs rename to lib/emscripten/tests/emtests/test_longjmp2.rs diff --git a/src/emtests/test_longjmp3.rs b/lib/emscripten/tests/emtests/test_longjmp3.rs similarity index 100% rename from src/emtests/test_longjmp3.rs rename to lib/emscripten/tests/emtests/test_longjmp3.rs diff --git a/src/emtests/test_longjmp4.rs b/lib/emscripten/tests/emtests/test_longjmp4.rs similarity index 100% rename from src/emtests/test_longjmp4.rs rename to lib/emscripten/tests/emtests/test_longjmp4.rs diff --git a/src/emtests/test_longjmp_exc.rs b/lib/emscripten/tests/emtests/test_longjmp_exc.rs similarity index 100% rename from src/emtests/test_longjmp_exc.rs rename to lib/emscripten/tests/emtests/test_longjmp_exc.rs diff --git a/src/emtests/test_longjmp_funcptr.rs b/lib/emscripten/tests/emtests/test_longjmp_funcptr.rs similarity index 100% rename from src/emtests/test_longjmp_funcptr.rs rename to lib/emscripten/tests/emtests/test_longjmp_funcptr.rs diff --git a/src/emtests/test_longjmp_repeat.rs b/lib/emscripten/tests/emtests/test_longjmp_repeat.rs similarity index 100% rename from src/emtests/test_longjmp_repeat.rs rename to lib/emscripten/tests/emtests/test_longjmp_repeat.rs diff --git a/src/emtests/test_longjmp_stacked.rs b/lib/emscripten/tests/emtests/test_longjmp_stacked.rs similarity index 100% rename from src/emtests/test_longjmp_stacked.rs rename to lib/emscripten/tests/emtests/test_longjmp_stacked.rs diff --git a/src/emtests/test_longjmp_throw.rs b/lib/emscripten/tests/emtests/test_longjmp_throw.rs similarity index 100% rename from src/emtests/test_longjmp_throw.rs rename to lib/emscripten/tests/emtests/test_longjmp_throw.rs diff --git a/src/emtests/test_longjmp_unwind.rs b/lib/emscripten/tests/emtests/test_longjmp_unwind.rs similarity index 100% rename from src/emtests/test_longjmp_unwind.rs rename to lib/emscripten/tests/emtests/test_longjmp_unwind.rs diff --git a/src/emtests/test_loop.rs b/lib/emscripten/tests/emtests/test_loop.rs similarity index 100% rename from src/emtests/test_loop.rs rename to lib/emscripten/tests/emtests/test_loop.rs diff --git a/src/emtests/test_lower_intrinsics.rs b/lib/emscripten/tests/emtests/test_lower_intrinsics.rs similarity index 100% rename from src/emtests/test_lower_intrinsics.rs rename to lib/emscripten/tests/emtests/test_lower_intrinsics.rs diff --git a/src/emtests/test_main_thread_async_em_asm.rs b/lib/emscripten/tests/emtests/test_main_thread_async_em_asm.rs similarity index 100% rename from src/emtests/test_main_thread_async_em_asm.rs rename to lib/emscripten/tests/emtests/test_main_thread_async_em_asm.rs diff --git a/src/emtests/test_mainenv.rs b/lib/emscripten/tests/emtests/test_mainenv.rs similarity index 100% rename from src/emtests/test_mainenv.rs rename to lib/emscripten/tests/emtests/test_mainenv.rs diff --git a/src/emtests/test_mathfuncptr.rs b/lib/emscripten/tests/emtests/test_mathfuncptr.rs similarity index 100% rename from src/emtests/test_mathfuncptr.rs rename to lib/emscripten/tests/emtests/test_mathfuncptr.rs diff --git a/src/emtests/test_memcpy2.rs b/lib/emscripten/tests/emtests/test_memcpy2.rs similarity index 100% rename from src/emtests/test_memcpy2.rs rename to lib/emscripten/tests/emtests/test_memcpy2.rs diff --git a/src/emtests/test_memcpy3.rs b/lib/emscripten/tests/emtests/test_memcpy3.rs similarity index 100% rename from src/emtests/test_memcpy3.rs rename to lib/emscripten/tests/emtests/test_memcpy3.rs diff --git a/src/emtests/test_memcpy_memcmp.rs b/lib/emscripten/tests/emtests/test_memcpy_memcmp.rs similarity index 100% rename from src/emtests/test_memcpy_memcmp.rs rename to lib/emscripten/tests/emtests/test_memcpy_memcmp.rs diff --git a/src/emtests/test_memmove.rs b/lib/emscripten/tests/emtests/test_memmove.rs similarity index 100% rename from src/emtests/test_memmove.rs rename to lib/emscripten/tests/emtests/test_memmove.rs diff --git a/src/emtests/test_memmove2.rs b/lib/emscripten/tests/emtests/test_memmove2.rs similarity index 100% rename from src/emtests/test_memmove2.rs rename to lib/emscripten/tests/emtests/test_memmove2.rs diff --git a/src/emtests/test_memmove3.rs b/lib/emscripten/tests/emtests/test_memmove3.rs similarity index 100% rename from src/emtests/test_memmove3.rs rename to lib/emscripten/tests/emtests/test_memmove3.rs diff --git a/src/emtests/test_memset.rs b/lib/emscripten/tests/emtests/test_memset.rs similarity index 100% rename from src/emtests/test_memset.rs rename to lib/emscripten/tests/emtests/test_memset.rs diff --git a/src/emtests/test_mmap.rs b/lib/emscripten/tests/emtests/test_mmap.rs similarity index 100% rename from src/emtests/test_mmap.rs rename to lib/emscripten/tests/emtests/test_mmap.rs diff --git a/src/emtests/test_negative_zero.rs b/lib/emscripten/tests/emtests/test_negative_zero.rs similarity index 100% rename from src/emtests/test_negative_zero.rs rename to lib/emscripten/tests/emtests/test_negative_zero.rs diff --git a/src/emtests/test_nested_struct_varargs.rs b/lib/emscripten/tests/emtests/test_nested_struct_varargs.rs similarity index 100% rename from src/emtests/test_nested_struct_varargs.rs rename to lib/emscripten/tests/emtests/test_nested_struct_varargs.rs diff --git a/src/emtests/test_nl_types.rs b/lib/emscripten/tests/emtests/test_nl_types.rs similarity index 100% rename from src/emtests/test_nl_types.rs rename to lib/emscripten/tests/emtests/test_nl_types.rs diff --git a/src/emtests/test_perrar.rs b/lib/emscripten/tests/emtests/test_perrar.rs similarity index 100% rename from src/emtests/test_perrar.rs rename to lib/emscripten/tests/emtests/test_perrar.rs diff --git a/src/emtests/test_phiundef.rs b/lib/emscripten/tests/emtests/test_phiundef.rs similarity index 100% rename from src/emtests/test_phiundef.rs rename to lib/emscripten/tests/emtests/test_phiundef.rs diff --git a/src/emtests/test_poll.rs b/lib/emscripten/tests/emtests/test_poll.rs similarity index 100% rename from src/emtests/test_poll.rs rename to lib/emscripten/tests/emtests/test_poll.rs diff --git a/src/emtests/test_posixtime.rs b/lib/emscripten/tests/emtests/test_posixtime.rs similarity index 100% rename from src/emtests/test_posixtime.rs rename to lib/emscripten/tests/emtests/test_posixtime.rs diff --git a/src/emtests/test_printf_2.rs b/lib/emscripten/tests/emtests/test_printf_2.rs similarity index 100% rename from src/emtests/test_printf_2.rs rename to lib/emscripten/tests/emtests/test_printf_2.rs diff --git a/src/emtests/test_printf_more.rs b/lib/emscripten/tests/emtests/test_printf_more.rs similarity index 100% rename from src/emtests/test_printf_more.rs rename to lib/emscripten/tests/emtests/test_printf_more.rs diff --git a/src/emtests/test_regex.rs b/lib/emscripten/tests/emtests/test_regex.rs similarity index 100% rename from src/emtests/test_regex.rs rename to lib/emscripten/tests/emtests/test_regex.rs diff --git a/src/emtests/test_relocatable_void_function.rs b/lib/emscripten/tests/emtests/test_relocatable_void_function.rs similarity index 100% rename from src/emtests/test_relocatable_void_function.rs rename to lib/emscripten/tests/emtests/test_relocatable_void_function.rs diff --git a/src/emtests/test_rounding.rs b/lib/emscripten/tests/emtests/test_rounding.rs similarity index 100% rename from src/emtests/test_rounding.rs rename to lib/emscripten/tests/emtests/test_rounding.rs diff --git a/src/emtests/test_set_align.rs b/lib/emscripten/tests/emtests/test_set_align.rs similarity index 100% rename from src/emtests/test_set_align.rs rename to lib/emscripten/tests/emtests/test_set_align.rs diff --git a/src/emtests/test_siglongjmp.rs b/lib/emscripten/tests/emtests/test_siglongjmp.rs similarity index 100% rename from src/emtests/test_siglongjmp.rs rename to lib/emscripten/tests/emtests/test_siglongjmp.rs diff --git a/src/emtests/test_sintvars.rs b/lib/emscripten/tests/emtests/test_sintvars.rs similarity index 100% rename from src/emtests/test_sintvars.rs rename to lib/emscripten/tests/emtests/test_sintvars.rs diff --git a/src/emtests/test_sizeof.rs b/lib/emscripten/tests/emtests/test_sizeof.rs similarity index 100% rename from src/emtests/test_sizeof.rs rename to lib/emscripten/tests/emtests/test_sizeof.rs diff --git a/src/emtests/test_sscanf.rs b/lib/emscripten/tests/emtests/test_sscanf.rs similarity index 100% rename from src/emtests/test_sscanf.rs rename to lib/emscripten/tests/emtests/test_sscanf.rs diff --git a/src/emtests/test_sscanf_3.rs b/lib/emscripten/tests/emtests/test_sscanf_3.rs similarity index 100% rename from src/emtests/test_sscanf_3.rs rename to lib/emscripten/tests/emtests/test_sscanf_3.rs diff --git a/src/emtests/test_sscanf_4.rs b/lib/emscripten/tests/emtests/test_sscanf_4.rs similarity index 100% rename from src/emtests/test_sscanf_4.rs rename to lib/emscripten/tests/emtests/test_sscanf_4.rs diff --git a/src/emtests/test_sscanf_5.rs b/lib/emscripten/tests/emtests/test_sscanf_5.rs similarity index 100% rename from src/emtests/test_sscanf_5.rs rename to lib/emscripten/tests/emtests/test_sscanf_5.rs diff --git a/src/emtests/test_sscanf_6.rs b/lib/emscripten/tests/emtests/test_sscanf_6.rs similarity index 100% rename from src/emtests/test_sscanf_6.rs rename to lib/emscripten/tests/emtests/test_sscanf_6.rs diff --git a/src/emtests/test_sscanf_caps.rs b/lib/emscripten/tests/emtests/test_sscanf_caps.rs similarity index 100% rename from src/emtests/test_sscanf_caps.rs rename to lib/emscripten/tests/emtests/test_sscanf_caps.rs diff --git a/src/emtests/test_sscanf_float.rs b/lib/emscripten/tests/emtests/test_sscanf_float.rs similarity index 100% rename from src/emtests/test_sscanf_float.rs rename to lib/emscripten/tests/emtests/test_sscanf_float.rs diff --git a/src/emtests/test_sscanf_hex.rs b/lib/emscripten/tests/emtests/test_sscanf_hex.rs similarity index 100% rename from src/emtests/test_sscanf_hex.rs rename to lib/emscripten/tests/emtests/test_sscanf_hex.rs diff --git a/src/emtests/test_sscanf_n.rs b/lib/emscripten/tests/emtests/test_sscanf_n.rs similarity index 100% rename from src/emtests/test_sscanf_n.rs rename to lib/emscripten/tests/emtests/test_sscanf_n.rs diff --git a/src/emtests/test_sscanf_other_whitespace.rs b/lib/emscripten/tests/emtests/test_sscanf_other_whitespace.rs similarity index 100% rename from src/emtests/test_sscanf_other_whitespace.rs rename to lib/emscripten/tests/emtests/test_sscanf_other_whitespace.rs diff --git a/src/emtests/test_sscanf_skip.rs b/lib/emscripten/tests/emtests/test_sscanf_skip.rs similarity index 100% rename from src/emtests/test_sscanf_skip.rs rename to lib/emscripten/tests/emtests/test_sscanf_skip.rs diff --git a/src/emtests/test_sscanf_whitespace.rs b/lib/emscripten/tests/emtests/test_sscanf_whitespace.rs similarity index 100% rename from src/emtests/test_sscanf_whitespace.rs rename to lib/emscripten/tests/emtests/test_sscanf_whitespace.rs diff --git a/src/emtests/test_stack_varargs.rs b/lib/emscripten/tests/emtests/test_stack_varargs.rs similarity index 100% rename from src/emtests/test_stack_varargs.rs rename to lib/emscripten/tests/emtests/test_stack_varargs.rs diff --git a/src/emtests/test_stack_void.rs b/lib/emscripten/tests/emtests/test_stack_void.rs similarity index 100% rename from src/emtests/test_stack_void.rs rename to lib/emscripten/tests/emtests/test_stack_void.rs diff --git a/src/emtests/test_statvfs.rs b/lib/emscripten/tests/emtests/test_statvfs.rs similarity index 100% rename from src/emtests/test_statvfs.rs rename to lib/emscripten/tests/emtests/test_statvfs.rs diff --git a/src/emtests/test_std_cout_new.rs b/lib/emscripten/tests/emtests/test_std_cout_new.rs similarity index 100% rename from src/emtests/test_std_cout_new.rs rename to lib/emscripten/tests/emtests/test_std_cout_new.rs diff --git a/src/emtests/test_strcasecmp.rs b/lib/emscripten/tests/emtests/test_strcasecmp.rs similarity index 100% rename from src/emtests/test_strcasecmp.rs rename to lib/emscripten/tests/emtests/test_strcasecmp.rs diff --git a/src/emtests/test_strcmp_uni.rs b/lib/emscripten/tests/emtests/test_strcmp_uni.rs similarity index 100% rename from src/emtests/test_strcmp_uni.rs rename to lib/emscripten/tests/emtests/test_strcmp_uni.rs diff --git a/src/emtests/test_strftime.rs b/lib/emscripten/tests/emtests/test_strftime.rs similarity index 100% rename from src/emtests/test_strftime.rs rename to lib/emscripten/tests/emtests/test_strftime.rs diff --git a/src/emtests/test_strings.rs b/lib/emscripten/tests/emtests/test_strings.rs similarity index 100% rename from src/emtests/test_strings.rs rename to lib/emscripten/tests/emtests/test_strings.rs diff --git a/src/emtests/test_strndup.rs b/lib/emscripten/tests/emtests/test_strndup.rs similarity index 100% rename from src/emtests/test_strndup.rs rename to lib/emscripten/tests/emtests/test_strndup.rs diff --git a/src/emtests/test_strptime_days.rs b/lib/emscripten/tests/emtests/test_strptime_days.rs similarity index 100% rename from src/emtests/test_strptime_days.rs rename to lib/emscripten/tests/emtests/test_strptime_days.rs diff --git a/src/emtests/test_strptime_reentrant.rs b/lib/emscripten/tests/emtests/test_strptime_reentrant.rs similarity index 100% rename from src/emtests/test_strptime_reentrant.rs rename to lib/emscripten/tests/emtests/test_strptime_reentrant.rs diff --git a/src/emtests/test_strstr.rs b/lib/emscripten/tests/emtests/test_strstr.rs similarity index 100% rename from src/emtests/test_strstr.rs rename to lib/emscripten/tests/emtests/test_strstr.rs diff --git a/src/emtests/test_strtod.rs b/lib/emscripten/tests/emtests/test_strtod.rs similarity index 100% rename from src/emtests/test_strtod.rs rename to lib/emscripten/tests/emtests/test_strtod.rs diff --git a/src/emtests/test_strtok.rs b/lib/emscripten/tests/emtests/test_strtok.rs similarity index 100% rename from src/emtests/test_strtok.rs rename to lib/emscripten/tests/emtests/test_strtok.rs diff --git a/src/emtests/test_strtol_bin.rs b/lib/emscripten/tests/emtests/test_strtol_bin.rs similarity index 100% rename from src/emtests/test_strtol_bin.rs rename to lib/emscripten/tests/emtests/test_strtol_bin.rs diff --git a/src/emtests/test_strtol_dec.rs b/lib/emscripten/tests/emtests/test_strtol_dec.rs similarity index 100% rename from src/emtests/test_strtol_dec.rs rename to lib/emscripten/tests/emtests/test_strtol_dec.rs diff --git a/src/emtests/test_strtol_hex.rs b/lib/emscripten/tests/emtests/test_strtol_hex.rs similarity index 100% rename from src/emtests/test_strtol_hex.rs rename to lib/emscripten/tests/emtests/test_strtol_hex.rs diff --git a/src/emtests/test_strtol_oct.rs b/lib/emscripten/tests/emtests/test_strtol_oct.rs similarity index 100% rename from src/emtests/test_strtol_oct.rs rename to lib/emscripten/tests/emtests/test_strtol_oct.rs diff --git a/src/emtests/test_strtold.rs b/lib/emscripten/tests/emtests/test_strtold.rs similarity index 100% rename from src/emtests/test_strtold.rs rename to lib/emscripten/tests/emtests/test_strtold.rs diff --git a/src/emtests/test_strtoll_bin.rs b/lib/emscripten/tests/emtests/test_strtoll_bin.rs similarity index 100% rename from src/emtests/test_strtoll_bin.rs rename to lib/emscripten/tests/emtests/test_strtoll_bin.rs diff --git a/src/emtests/test_strtoll_dec.rs b/lib/emscripten/tests/emtests/test_strtoll_dec.rs similarity index 100% rename from src/emtests/test_strtoll_dec.rs rename to lib/emscripten/tests/emtests/test_strtoll_dec.rs diff --git a/src/emtests/test_strtoll_hex.rs b/lib/emscripten/tests/emtests/test_strtoll_hex.rs similarity index 100% rename from src/emtests/test_strtoll_hex.rs rename to lib/emscripten/tests/emtests/test_strtoll_hex.rs diff --git a/src/emtests/test_strtoll_oct.rs b/lib/emscripten/tests/emtests/test_strtoll_oct.rs similarity index 100% rename from src/emtests/test_strtoll_oct.rs rename to lib/emscripten/tests/emtests/test_strtoll_oct.rs diff --git a/src/emtests/test_struct_varargs.rs b/lib/emscripten/tests/emtests/test_struct_varargs.rs similarity index 100% rename from src/emtests/test_struct_varargs.rs rename to lib/emscripten/tests/emtests/test_struct_varargs.rs diff --git a/src/emtests/test_time_c.rs b/lib/emscripten/tests/emtests/test_time_c.rs similarity index 100% rename from src/emtests/test_time_c.rs rename to lib/emscripten/tests/emtests/test_time_c.rs diff --git a/src/emtests/test_tracing.rs b/lib/emscripten/tests/emtests/test_tracing.rs similarity index 100% rename from src/emtests/test_tracing.rs rename to lib/emscripten/tests/emtests/test_tracing.rs diff --git a/src/emtests/test_transtrcase.rs b/lib/emscripten/tests/emtests/test_transtrcase.rs similarity index 100% rename from src/emtests/test_transtrcase.rs rename to lib/emscripten/tests/emtests/test_transtrcase.rs diff --git a/src/emtests/test_trickystring.rs b/lib/emscripten/tests/emtests/test_trickystring.rs similarity index 100% rename from src/emtests/test_trickystring.rs rename to lib/emscripten/tests/emtests/test_trickystring.rs diff --git a/src/emtests/test_uname.rs b/lib/emscripten/tests/emtests/test_uname.rs similarity index 100% rename from src/emtests/test_uname.rs rename to lib/emscripten/tests/emtests/test_uname.rs diff --git a/src/emtests/test_unary_literal.rs b/lib/emscripten/tests/emtests/test_unary_literal.rs similarity index 100% rename from src/emtests/test_unary_literal.rs rename to lib/emscripten/tests/emtests/test_unary_literal.rs diff --git a/src/emtests/test_utf.rs b/lib/emscripten/tests/emtests/test_utf.rs similarity index 100% rename from src/emtests/test_utf.rs rename to lib/emscripten/tests/emtests/test_utf.rs diff --git a/src/emtests/test_varargs.rs b/lib/emscripten/tests/emtests/test_varargs.rs similarity index 100% rename from src/emtests/test_varargs.rs rename to lib/emscripten/tests/emtests/test_varargs.rs diff --git a/src/emtests/test_varargs_multi.rs b/lib/emscripten/tests/emtests/test_varargs_multi.rs similarity index 100% rename from src/emtests/test_varargs_multi.rs rename to lib/emscripten/tests/emtests/test_varargs_multi.rs diff --git a/src/emtests/test_vprintf.rs b/lib/emscripten/tests/emtests/test_vprintf.rs similarity index 100% rename from src/emtests/test_vprintf.rs rename to lib/emscripten/tests/emtests/test_vprintf.rs diff --git a/src/emtests/test_vsnprintf.rs b/lib/emscripten/tests/emtests/test_vsnprintf.rs similarity index 100% rename from src/emtests/test_vsnprintf.rs rename to lib/emscripten/tests/emtests/test_vsnprintf.rs diff --git a/src/emtests/test_wprintf.rs b/lib/emscripten/tests/emtests/test_wprintf.rs similarity index 100% rename from src/emtests/test_wprintf.rs rename to lib/emscripten/tests/emtests/test_wprintf.rs diff --git a/src/emtests/test_write_stdout_fileno.rs b/lib/emscripten/tests/emtests/test_write_stdout_fileno.rs similarity index 100% rename from src/emtests/test_write_stdout_fileno.rs rename to lib/emscripten/tests/emtests/test_write_stdout_fileno.rs diff --git a/src/emtests/test_zero_multiplication.rs b/lib/emscripten/tests/emtests/test_zero_multiplication.rs similarity index 100% rename from src/emtests/test_zero_multiplication.rs rename to lib/emscripten/tests/emtests/test_zero_multiplication.rs diff --git a/src/emtests/test_zerodiv.rs b/lib/emscripten/tests/emtests/test_zerodiv.rs similarity index 100% rename from src/emtests/test_zerodiv.rs rename to lib/emscripten/tests/emtests/test_zerodiv.rs diff --git a/lib/runtime/Cargo.toml b/lib/runtime/Cargo.toml index 4ff9ec560..0bca28007 100644 --- a/lib/runtime/Cargo.toml +++ b/lib/runtime/Cargo.toml @@ -1,7 +1,13 @@ [package] name = "wasmer-runtime" version = "0.1.0" -authors = ["Lachlan Sneff "] +authors = [ + "Lachlan Sneff ", + "Steve Akinyemi ", + "Mackenzie Clark ", + "Brandon Fish ", + "Syrus Akbary " +] edition = "2018" build = "build/mod.rs" diff --git a/src/apis/host/mod.rs b/src/apis/host/mod.rs deleted file mode 100644 index d92dd7201..000000000 --- a/src/apis/host/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -mod posix; - -// TODO: Make portable -pub use self::posix::*; diff --git a/src/apis/host/posix/env.rs b/src/apis/host/posix/env.rs deleted file mode 100644 index 424e7a9cf..000000000 --- a/src/apis/host/posix/env.rs +++ /dev/null @@ -1,4 +0,0 @@ -// pub extern "C" fn get_env(name: &str, _instance: &mut Instance) -> Result { -// debug!("host::get_env({:?})", name); -// env::var(name) -// } diff --git a/src/apis/host/posix/mod.rs b/src/apis/host/posix/mod.rs deleted file mode 100644 index 68c341cc6..000000000 --- a/src/apis/host/posix/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod env; -pub mod syscalls; - -pub use self::env::*; -pub use self::syscalls::*; diff --git a/src/apis/host/posix/syscalls.rs b/src/apis/host/posix/syscalls.rs deleted file mode 100644 index 161e85c4b..000000000 --- a/src/apis/host/posix/syscalls.rs +++ /dev/null @@ -1,48 +0,0 @@ -// NOTE: These syscalls only support wasm_32 for now because they take u32 offset - -// use libc::{ -// c_int, -// c_void, -// size_t, -// ssize_t, -// exit, -// read, -// write, -// open, -// close, -// }; - -// use crate::webassembly::{Instance}; - -// /// emscripten: ___syscall1 -// pub extern "C" fn sys_exit(status: c_int, _instance: &mut Instance) { -// debug!("host::sys_exit"); -// unsafe { exit(status); } -// } - -// /// emscripten: ___syscall3 -// pub extern "C" fn sys_read(fd: c_int, buf: *mut c_void, count: size_t, instance: &mut Instance) -> ssize_t { -// debug!("host::sys_read"); -// let buf_addr = instance.memory_offset_addr(0, buf as usize) as *mut c_void; -// unsafe { read(fd, buf_addr, count) } -// } - -// /// emscripten: ___syscall4 -// pub extern "C" fn sys_write(which: c_int, mode: c_int, instance: &mut Instance) -> c_int { -// debug!("host::sys_write({}, {})", which, mode); -// // unsafe { write(which, mode) }; -// 0 -// } -// /// emscripten: ___syscall5 -// pub extern "C" fn sys_open(path: u32, flags: c_int, mode: c_int, instance: &mut Instance) -> c_int { -// debug!("host::sys_open({}, {}, {})", path, flags, mode); -// // let path_addr = instance.memory_offset_addr(0, path as usize) as *const i8; -// // unsafe { open(path_addr, flags, mode) }; -// -2 -// } - -// /// emscripten: ___syscall6 -// pub extern "C" fn sys_close(fd: c_int, _instance: &mut Instance) -> c_int { -// debug!("host::sys_close"); -// unsafe { close(fd) } -// } diff --git a/src/apis/mod.rs b/src/apis/mod.rs deleted file mode 100644 index d96282fb8..000000000 --- a/src/apis/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod emscripten; -pub mod host; - -pub use self::emscripten::{align_memory, generate_emscripten_env, is_emscripten_module}; diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 883aed0e8..52ba9cba9 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -12,6 +12,7 @@ use structopt::StructOpt; use wasmer::*; use wasmer_runtime; +use wasmer_emscripten; #[derive(Debug, StructOpt)] #[structopt(name = "wasmer", about = "WASM execution runtime.")] @@ -73,14 +74,14 @@ fn execute_wasm(options: &Run) -> Result<(), String> { let module = webassembly::compile(&wasm_binary[..]) .map_err(|err| format!("Can't create the WebAssembly module: {}", err))?; - let abi = if apis::is_emscripten_module(&module) { + let abi = if wasmer_emscripten::is_emscripten_module(&module) { webassembly::InstanceABI::Emscripten } else { webassembly::InstanceABI::None }; let import_object = if abi == webassembly::InstanceABI::Emscripten { - apis::generate_emscripten_env() + wasmer_emscripten::generate_emscripten_env() } else { wasmer_runtime::Imports::new() }; diff --git a/src/common/stdio.rs b/src/common/stdio.rs index 8e26c67ce..20c9420a3 100644 --- a/src/common/stdio.rs +++ b/src/common/stdio.rs @@ -1,4 +1,4 @@ -use crate::common::file_descriptor::FileDescriptor; +use super::file_descriptor::FileDescriptor; use libc; use std::io::BufReader; use std::io::Read; diff --git a/src/emtests/_common.rs b/src/emtests/_common.rs deleted file mode 100644 index 5cd47853f..000000000 --- a/src/emtests/_common.rs +++ /dev/null @@ -1,39 +0,0 @@ -macro_rules! assert_emscripten_output { - ($file:expr, $name:expr, $args:expr, $expected:expr) => {{ - use crate::apis::generate_emscripten_env; - use crate::common::stdio::StdioCapturer; - use wasmer_runtime::{Import, Imports, FuncRef}; - use wasmer_runtime::table::TableBacking; - use crate::webassembly::{get_isa, instantiate, start_instance, InstanceABI, InstanceOptions}; - use std::sync::Arc; - - let wasm_bytes = include_bytes!($file); - let import_object = generate_emscripten_env(); - let options = Some(InstanceOptions { - mock_missing_imports: true, - mock_missing_globals: true, - mock_missing_tables: true, - abi: InstanceABI::Emscripten, - show_progressbar: false, -// isa: get_isa(), - }); - let mut result_object = instantiate(&wasm_bytes.to_vec(), &import_object, options) - .expect("Not compiled properly"); - let capturer = StdioCapturer::new(); - start_instance( - Arc::clone(&result_object.module), - &mut result_object.instance, - $name, - $args, - ) - .unwrap(); - let output = capturer.end().unwrap().0; - let expected_output = include_str!($expected); - assert!( - output.contains(expected_output), - "Output: `{}` does not contain expected output: `{}`", - output, - expected_output - ); - }}; -} diff --git a/src/lib.rs b/src/lib.rs index c6bc82fc6..20047afff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,6 +11,7 @@ extern crate wabt; extern crate wasmparser; extern crate wasmer_clif_backend; extern crate wasmer_runtime; +extern crate wasmer_emscripten; #[macro_use] extern crate target_lexicon; extern crate byteorder; @@ -27,10 +28,7 @@ extern crate winapi; mod macros; #[macro_use] pub mod recovery; -pub mod apis; pub mod common; -#[cfg(test)] -mod emtests; pub mod sighandler; pub mod update; pub mod webassembly; diff --git a/src/webassembly/mod.rs b/src/webassembly/mod.rs index f2d7a3bd9..50c40d82e 100644 --- a/src/webassembly/mod.rs +++ b/src/webassembly/mod.rs @@ -20,7 +20,7 @@ use wasmparser::WasmDecoder; pub use self::errors::{Error, ErrorKind}; -use crate::apis::emscripten::{allocate_cstr_on_stack, allocate_on_stack, is_emscripten_module}; +use wasmer_emscripten::{allocate_cstr_on_stack, allocate_on_stack, is_emscripten_module}; pub struct ResultObject { /// A webassembly::Module object representing the compiled WebAssembly module. From 0b4837468290a06a7a08abf824451e512a1f1fe0 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 10 Jan 2019 21:46:02 -0800 Subject: [PATCH 2/3] Fixed Makefile emtests generator --- Makefile | 2 +- lib/emscripten/build/emtests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e96f01e52..8d2af451b 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ spectests: WASMER_RUNTIME_GENERATE_SPECTESTS=1 cargo build -p wasmer-runtime emtests: - WASM_GENERATE_EMTESTS=1 cargo build + WASM_EMSCRIPTEN_GENERATE_EMTESTS=1 cargo build -p wasmer-emscripten # clean: # rm -rf artifacts diff --git a/lib/emscripten/build/emtests.rs b/lib/emscripten/build/emtests.rs index 949aac983..09c4419bf 100644 --- a/lib/emscripten/build/emtests.rs +++ b/lib/emscripten/build/emtests.rs @@ -138,7 +138,7 @@ fn test_{rs_module_name}() {{ } pub fn build() { - let rust_test_modpath = concat!(env!("CARGO_MANIFEST_DIR"), "/src/emtests/mod.rs"); + let rust_test_modpath = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/emtests/mod.rs"); let mut modules: Vec = Vec::new(); // modules.reserve_exact(TESTS.len()); From 34869ff3c80aaac87bdae5b1bfb0d79154ad6d18 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 10 Jan 2019 21:52:14 -0800 Subject: [PATCH 3/3] Fixed emscripten emtests env var name --- lib/emscripten/build/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/emscripten/build/mod.rs b/lib/emscripten/build/mod.rs index 81c3fd865..06d11ae6b 100644 --- a/lib/emscripten/build/mod.rs +++ b/lib/emscripten/build/mod.rs @@ -2,10 +2,10 @@ use std::env; mod emtests; -static SPECTESTS_ENV_VAR: &str = "WASM_EMSCRIPTEN_GENERATE_EMTESTS"; +static EMTESTS_ENV_VAR: &str = "WASM_EMSCRIPTEN_GENERATE_EMTESTS"; fn main() { - if env::var(SPECTESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" { + if env::var(EMTESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" { emtests::build(); } } \ No newline at end of file