Commit Graph

612 Commits

Author SHA1 Message Date
Brandon Fish
0c4175e7c3 Move the em specific run_instance code into em lib 2019-01-23 18:47:34 -06:00
Steve Akinyemi
8661a0096e Add getting main arguments 2019-01-23 22:29:51 +01:00
Lachlan Sneff
ab65477d1f
Refine the runtime api and document the exposed items (#115)
* private module, remove unused method, docs on compile_with

* refine runtime api and document exposed items

* Fix integration test build

* Fix lint
2019-01-23 12:34:15 -08:00
Brandon Fish
74875ed554 Library restructure (#104)
* Move wasmer-runtime to wasmer-runtime-core

* Add the runtime library

* Fix issue with macros using wasmer_runtime, fmt

* Make default compiler dependency optional

* Add instantiate and validate functions
2019-01-22 11:02:06 -08:00
Lachlan Sneff
6aca222795 Fix emscripten compile issue 2019-01-21 16:42:20 -08:00
Lachlan Sneff
3563741f4f Remove macro feature that is confusing
This reverts commit fbe480cc08.
2019-01-21 14:50:17 -08:00
Lachlan Sneff
fbe480cc08 Fix macro 2019-01-21 14:47:19 -08:00
Lachlan Sneff
10c5aa02a2 Add export_func macro, prelude, and rename imports stuff 2019-01-21 14:43:04 -08:00
Syrus
e8ccea44a5 Removed unnecessary files 2019-01-20 14:20:41 -08:00
Syrus
a9056d580b Use eprintln! instead of println! for errors 2019-01-20 14:16:13 -08:00
Brandon Fish
6cf68d63ac Remove unused extern crates 2019-01-19 00:51:29 -06:00
Brandon Fish
323830fbae Cleanup expect function call 2019-01-19 00:39:48 -06:00
Brandon Fish
e15ffe020c Remove unused macro imports 2019-01-19 00:35:29 -06:00
Brandon Fish
47384c4f3c Remove unused webassembly relocation and libcalls 2019-01-19 00:31:42 -06:00
Brandon Fish
2f6746655d Cleanup wasmer bin and webassembly 2019-01-19 00:28:41 -06:00
Brandon Fish
d715c26b1f Removing commented out code 2019-01-18 18:39:00 -06:00
Brandon Fish
7fc892be07 Removing some unused imports, cleanup 2019-01-18 18:36:28 -06:00
Syrus
6d55776b8e Fix formatting 2019-01-18 11:15:13 -08:00
Lachlan Sneff
8a9f5fa61a
Add special error types for compile, linking, and runtime errors. (#99)
* Add error types and convert most results to wasmer-runtime results

* Fix spectests

* Fix umbrella project to work with new error types
2019-01-18 10:54:16 -08:00
Brandon Fish
ac994d0c51 Remove unused import 2019-01-18 01:01:45 -06:00
Brandon Fish
e43c3cb2eb cargo fmt 2019-01-18 00:18:13 -06:00
Brandon Fish
1025a0d730 Emscripten tests compiling again 2019-01-17 23:55:44 -06:00
Brandon Fish
321abe6644 Merge branch 'feature/vm_refactor' into fix/vm_refactor_esmcripten_integration 2019-01-17 23:20:56 -06:00
Syrus
620f40c144 Make build and tests pass again by skipping emscripten 2019-01-17 17:44:33 -08:00
Steve Akinyemi
456a76a5e5 Fix emtest compilation issues 2019-01-18 01:25:05 +01:00
Steve Akinyemi
a17d8c0877 Add rebase fix 2019-01-17 23:23:21 +01:00
Steve Akinyemi
0bf6ce49f6 Update emscripten to latest changes 2019-01-17 23:19:15 +01:00
Steve Akinyemi
fdb0841783 Fix emscripten globals 2019-01-17 23:19:14 +01:00
Steve Akinyemi
927f6e4155 Fix other issues with emscripten integration 2019-01-17 23:19:14 +01:00
Syrus
de459fa5bd Isolated emscripten in new lib 2019-01-10 21:38:10 -08:00
Brandon Fish
86785be641 Fix emtests compilation 2019-01-09 19:53:06 -06:00
Brandon Fish
19e9ae5721 Remove old spectests and src/spectests now in lib/runtime 2019-01-09 19:52:55 -06:00
Brandon Fish
3e641d9f89 Updates to get wasmer crate compiling 2019-01-09 19:45:48 -06:00
Brandon Fish
14c9512cf4 Remove old src/runtime and src/compilers directories 2019-01-09 00:49:11 -06:00
Steve Akinyemi
2c490edf3f Implement func resolver 2019-01-08 18:52:19 +01:00
Steve Akinyemi
231ed37127 Implement compilation and relocation of functions 2019-01-08 17:26:28 +01:00
Brandon Fish
fe0a146513 Change Instance::new visibility temporarily to workaround compile failure, format 2019-01-07 23:17:30 -06:00
Lachlan Sneff
93a7c49138 Move SigRegistry into module 2019-01-07 23:28:56 -05:00
Brandon Fish
f57bcc47a1 Remove unused imports 2019-01-06 16:29:45 -06:00
Brandon Fish
2f9119a7f0 Update tests for old runtime removal 2019-01-06 15:45:41 -06:00
Brandon Fish
f714049c61 Remove old runtime and format 2019-01-06 15:21:06 -06:00
Brandon Fish
c0c0ef833a Merge branch 'master' into feature/vm_refactor 2019-01-06 14:47:45 -06:00
Brandon Fish
3c21823cc0 Fix spectest generation 2019-01-06 02:18:49 -06:00
Mackenzie Clark
dc88df016a wrong size field 2019-01-03 18:39:07 -08:00
Brandon Fish
68cb6aaf8c Call malloc, memalign, memset from exports instead of emscripten_data 2019-01-02 20:50:13 -06:00
Mackenzie Clark
802e3ba57f add missing fields 2019-01-02 16:37:19 -08:00
Mackenzie Clark
2a80c200bc keep fields in wasm 2019-01-02 16:37:19 -08:00
Mackenzie Clark
4739060444 new guest stat struct and conditional fields for windows 2019-01-02 16:37:19 -08:00
Mackenzie Clark
72ad289a39 fix macos build 2019-01-01 16:53:24 -08:00
Mackenzie Clark
b60c8424af use clock constants and nginx test 2018-12-31 14:56:28 -08:00
Brandon Fish
a5bafebc83 Convert emscripten imports to new types 2018-12-31 14:55:14 -06:00
Brandon Fish
5f101377ff Update ImportResolver to Option<&Import> 2018-12-31 11:32:39 -06:00
Steve Akinyemi
9af9e75bfd Add signatures conversion 2018-12-31 14:20:05 +01:00
Steve Akinyemi
95dc292637 Merge changes from bjfish 2018-12-31 10:11:54 +01:00
Steve Akinyemi
26fa2e88c0 Complete FuncEnvironment implementation 2018-12-31 10:10:12 +01:00
Brandon Fish
2551a18ed4 Implement make_direct_func, add mock func resolver 2018-12-31 00:05:47 -06:00
Steve Akinyemi
6d4c1ecdef Implement parts of FuncEnvironment 2018-12-31 02:22:57 +01:00
Brandon Fish
b27c6241bb Fix style warning: redundant field names 2018-12-30 16:55:28 -06:00
Brandon Fish
25fd370792 Add wasm validation to compiler 2018-12-30 15:06:52 -06:00
Steve Akinyemi
e2a2e9a7b2 Fix build 2018-12-30 12:41:06 +01:00
Steve Akinyemi
caa8f011db Merge changes 2018-12-30 12:35:19 +01:00
Steve Akinyemi
f802dd4f12 Add global conversion 2018-12-30 12:10:53 +01:00
Steve Akinyemi
77b100138d Add global impl 2018-12-30 11:20:24 +01:00
Lachlan Sneff
4bfebaf83b format spectests 2018-12-30 01:01:33 -05:00
Lachlan Sneff
3547eb2a0e Change Val to Value 2018-12-30 01:00:19 -05:00
Brandon Fish
354ff1ecad Update main and tests to use refactor (#84)
* Update main and tests to use refactor

* Updates to make tests compile

* Update CraneliftCompiler -> Cranelift

* Workaround latest imports and instance changes

* Change is_emscripten_module back to reference

* Fix is_emscripten_module references

* Update f32 and f64 test values, create slice without vec!
2018-12-29 21:42:03 -05:00
Brandon Fish
c54516b695 Fix compilation 2018-12-29 14:26:59 -06:00
Lachlan Sneff
faf41e295c Add FuncResolver and ImportResolver traits 2018-12-29 15:23:52 -05:00
Steve Akinyemi
8a19b042f8 Add change in mod.rs 2018-12-29 19:40:25 +01:00
Steve Akinyemi
af3bfadbd1 Improve cranelift module 2018-12-29 19:37:38 +01:00
Steve Akinyemi
dcbdb08eb4 Add some cranelift codegen 2018-12-29 14:00:01 +01:00
Brandon Fish
4a7560dcd3 Document Compiler trait 2018-12-28 16:09:10 -06:00
Lachlan Sneff
a5b4cc21f6 Change order of Map type params and globalinit to Initializer 2018-12-28 16:40:50 -05:00
Brandon Fish
696bc9a0a9 Merge branch 'master' into feature/vm_refactor 2018-12-28 15:15:24 -06:00
Syrus Akbary
2ee910416d Trying to fix failures in build-mac tests 2018-12-28 13:59:55 +01:00
Syrus Akbary
76d2d80169
Merge branch 'master' into feature/add-emscripten-core-tests 2018-12-28 12:42:41 +01:00
Syrus Akbary
9a8d3a2546 Fixed formatting 2018-12-28 12:38:39 +01:00
Mackenzie Clark
e7cf5cb5b1 use default values for gnu library extension fields
no extra clone


no mut warning
2018-12-27 20:15:01 -08:00
Mackenzie Clark
cb65c9dad6 refactor localtime functions to use time crate
lint fixes
2018-12-27 09:41:29 -08:00
Brandon Fish
8d8f20a11c Merge branch 'master' into feature/add-emscripten-core-tests 2018-12-27 10:30:41 -06:00
Mackenzie Clark
2107df3c99 only support clock id 0 2018-12-27 06:57:00 -08:00
Lachlan Sneff
3aac97db42 Fix formatting 2018-12-27 09:56:26 -05:00
Brandon Fish
81b952ebec Add Emscripten tests/core tests 2018-12-27 01:46:41 -06:00
Brandon Fish
8921385fbb Update emtests to glob for c/cpp files, use ignores.txt to exclude tests, disable cc out by default 2018-12-27 01:43:38 -06:00
Lachlan Sneff
98c9ce5ed9 Add memory_grow*, memory_size vmcalls 2018-12-27 00:58:16 -05:00
Lachlan Sneff
0f3833fecb Add support for the start function 2018-12-27 00:07:48 -05:00
Lachlan Sneff
74f0ff444a Add support for tables 2018-12-26 22:29:42 -05:00
Lachlan Sneff
b9976f10b7 Fix compile warnings 2018-12-26 20:47:34 -05:00
Lachlan Sneff
a7618346e6 Make sig registry private 2018-12-26 20:44:45 -05:00
Lachlan Sneff
3861fe98c6 Add typesafe wasm export calls 2018-12-26 20:42:23 -05:00
Mackenzie Clark
4813047d37 clock_gettime with time crate and test
more lint
2018-12-26 16:58:23 -08:00
Lachlan Sneff
4bd2c3d053 Change FuncResolver::resolve signature 2018-12-26 17:28:07 -05:00
Lachlan Sneff
1bb5e420f3 Fix vm anyfunc offset 2018-12-26 17:01:52 -05:00
Lachlan Sneff
baf22b55be Fix formatting 2018-12-26 16:55:11 -05:00
Lachlan Sneff
53fab9c278 Update to latest master 2018-12-26 16:53:08 -05:00
Lachlan Sneff
e2a9bd4761
Merge branch 'master' into feature/vm_refactor 2018-12-26 15:51:14 -05:00
Lachlan Sneff
4fbf60e6ae Expose types module 2018-12-26 15:13:31 -05:00
Lachlan Sneff
503a2cfe64 Expose FuncResolver trait 2018-12-26 15:09:39 -05:00
Lachlan Sneff
4f0ef7f534 Add compilers modules 2018-12-26 15:07:28 -05:00
Lachlan Sneff
9f8798764e Runtime refactor compiles 2018-12-26 15:00:28 -05:00
Lachlan Sneff
5ce75fc0ad Fix most compile-time errors 2018-12-25 00:19:05 -05:00
Lachlan Sneff
fb04ba0bce Replace webassembly folder with master 2018-12-24 23:06:19 -05:00
Lachlan Sneff
c06c65e7c6 Add preliminary support for imports 2018-12-24 23:05:04 -05:00
Lachlan Sneff
93ef1e4220 new runtime module 2018-12-24 17:25:17 -05:00
Brandon Fish
bfa68e8d79 Add workaround to prevent use after free issue resulting in bad pointer 2018-12-24 13:10:29 -06:00
Syrus
3764e02607 Added emscriptent environment docs 2018-12-21 22:37:39 -08:00
Syrus
1ad580a618 Improved emscripten env(get,set,unset,put) integration 2018-12-21 17:16:40 -08:00
Syrus
ae77811c4d Merge branch 'master' into fix/emscripten-env
# Conflicts:
#	build/emtests.rs
#	src/emtests/mod.rs
2018-12-21 16:58:41 -08:00
Mackenzie Clark
cfb8442d6b lint 2018-12-20 23:08:00 -08:00
Mackenzie Clark
bc63bb736a this shouldn't be here 2018-12-20 21:58:00 -08:00
Mackenzie Clark
207c4d8d55 unwrap it 2018-12-20 21:55:03 -08:00
Mackenzie Clark
3783b923d1 implement a cross-platform stdout pipe 2018-12-20 21:50:24 -08:00
Brandon Fish
4c883c53a4 Make the StdioCapturer module only for test 2018-12-20 00:23:29 -06:00
Brandon Fish
abdb63148a Disable the Cranelift verifier by default except for tests 2018-12-19 19:59:45 -06:00
Syrus
a912c14022 Improved documentation of setjmp/longjmp 2018-12-19 00:13:16 -08:00
Syrus
db93d2693d Make setjmp/longjmp more secure 2018-12-18 23:21:18 -08:00
Syrus Akbary
e278bd4a29
Merge branch 'master' into feature/run-lua-wasm 2018-12-18 17:33:37 -08:00
Syrus
88ee0d736e Trying to fix linux compilation error 2018-12-18 17:31:30 -08:00
Lachlan Sneff
5b920b7953 More backing work 2018-12-18 20:28:15 -05:00
Syrus
116ed86668 Improved formatting 2018-12-18 17:23:45 -08:00
Syrus
87c3c037e4 Added emscripten jmp instructions 2018-12-18 17:21:12 -08:00
Syrus
903e3223dd Fix formatting 2018-12-18 09:43:59 -08:00
Syrus
2d5a1fd170 Merge branch 'master' into feature/run-lua-wasm
# Conflicts:
#	src/apis/emscripten/env.rs
#	src/apis/emscripten/mod.rs
#	src/apis/emscripten/process.rs
#	src/apis/emscripten/syscalls.rs
2018-12-18 09:43:36 -08:00
Steve Akinyemi
ef205fb60f Fix segfault 2018-12-18 14:00:18 +01:00
Syrus
be265ddba7 Improved lint 2018-12-17 22:26:05 -08:00
Syrus
bb298f1890 Merge branch 'master' into feature/emscripten-refactor 2018-12-17 22:24:44 -08:00
Syrus
3f27610459 Refactored emscripten logic out of Instance 2018-12-17 22:23:49 -08:00
Brandon Fish
fd94c2df86 Add more argument info to debug messages 2018-12-17 23:54:00 -06:00
Lachlan Sneff
e4dab88efd Redesign of vm data 2018-12-17 22:43:26 -05:00
Brandon Fish
ac87344013 Add emscripten nullfunc_v (#65) 2018-12-17 22:21:15 -05:00
Lachlan Sneff
0847c950a4 Merge branch 'master' into feature/vm_refactor 2018-12-17 21:51:03 -05:00
Lachlan Sneff
93f8cdfc81
Update cranelift to 0.26.0. (#64)
* Initial additional modules

* Update to cranelift 0.26.0

* Fixed formatting
2018-12-17 21:30:27 -05:00
Lachlan Sneff
fafb904875 Initial additional modules 2018-12-17 18:57:44 -05:00
Steve Akinyemi
a2bd8d170f Remove debug prints 2018-12-17 09:15:08 +01:00
Brandon Fish
de85ab943a Add Emscripten globals for Infinity and NaN to fix printf for these values 2018-12-16 14:00:43 -06:00
Syrus Akbary
ae210253b6
Merge pull request #61 from bjfish/debug-message-for-mocked-missing-tables-globals
Add debug messages for mocked missing globals and tables
2018-12-16 11:20:55 -08:00
Brandon Fish
4b33b101ed Add a debug messages for mocked missing globals and tables 2018-12-16 10:43:35 -06:00
Syrus
982db0281c Added support for 0 or 2 params in main emscripten function 2018-12-15 22:51:10 -08:00
Syrus Akbary
ff45aea0ea [WIP] Improved memory handling (#56)
* Improved memory handling

* Fix memory accessibility

* Fix formatting
2018-12-15 13:30:53 -05:00
Brandon Fish
c6957a6287 Run cargo fmt to clean up 2018-12-15 01:17:55 -06:00
Syrus Akbary
914b20d01f
Merge branch 'master' into fix-additional-clippy-warnings 2018-12-14 23:06:45 -08:00
Brandon Fish
572115f140 Initial format using rustfmt 2018-12-15 00:46:11 -06:00
Brandon Fish
9971c21d74 Fix clippy error equal expressions as operands to - 2018-12-15 00:11:32 -06:00
Brandon Fish
aa7fc05ea1 Fix clippy warning length comparison to one 2018-12-15 00:10:07 -06:00
Brandon Fish
d405d8de41 Fix clippy warnings unneeded returns 2018-12-15 00:07:14 -06:00
Brandon Fish
5b7f0f10dc Fix clippy redundant field names in struct initialization 2018-12-15 00:06:47 -06:00
Syrus
9d3b76835c Merge branch 'feature/runtime-upgrade' of github.com:wasmerio/wasmer into feature/runtime-upgrade 2018-12-14 19:57:44 -08:00
Syrus
1057131bc7 Added description of offset_guard_size 2018-12-14 19:57:00 -08:00
Syrus Akbary
81fb2fbd0b
Merge branch 'master' into feature/runtime-upgrade 2018-12-14 17:41:03 -08:00
Syrus
7e78d3c661 Improved max size code 2018-12-14 17:40:29 -08:00