Commit Graph

2428 Commits

Author SHA1 Message Date
losfair
fac4c452c6 Fix LLVM backend. 2019-05-14 18:49:02 +08:00
Ivan Enderlin
07499329dd chore(changelog) Add #440. 2019-05-14 11:54:13 +02:00
Ivan Enderlin
2b250c30f3 chore(runtime-c-api) Regenerate C/C++ header files. 2019-05-14 11:50:10 +02:00
Ivan Enderlin
f68379a6df test(runtime-c-api) Use *_arity variables when calling wasmer_export_func_call. 2019-05-14 11:49:40 +02:00
Ivan Enderlin
d3c75a38fa fix(runtime-c-api) wasmer_instance_call types matches wasmer_export_func_*_arity.
The `wasmer_export_func_params_arity` and
`wasmer_export_func_returns_arity` functions store the arity in a
`uint32_t`. The `wasmer_instance_call` expects `c_int`. There is a
type mismatch here. It's not annoying in C or C++, but in some other
languages that have bindings to C/C++, it can imply useless casting.

This patch changes `wasmer_instance_call` to expect `uint32_t` for
`params_len` and `results_len` to match the
`wasmer_export_func_*_arity` functions.
2019-05-14 11:46:43 +02:00
losfair
5ec931ef83 Fix kwasmd compilation 2019-05-14 17:26:46 +08:00
losfair
d641909c63 Fix clippy error 2019-05-14 17:13:17 +08:00
losfair
ee09209bfb Fix clippy error. 2019-05-14 16:59:18 +08:00
losfair
98dd2c0289 Fix wasm example crates. 2019-05-14 16:52:09 +08:00
losfair
d60e2377c1 Only compile kwasm-net for wasm32-wasi. 2019-05-14 16:45:26 +08:00
losfair
1e7a928d64 Add comments. 2019-05-14 16:13:42 +08:00
losfair
32f9aee6fe Cargo fmt 2019-05-14 16:04:08 +08:00
losfair
722ea39877 Cleanup loader code. 2019-05-14 16:02:27 +08:00
losfair
2a160c74ad Fix wasmer-runtime-core dependency version. 2019-05-14 15:47:19 +08:00
losfair
db9705f00c Merge remote-tracking branch 'origin/master' into feature/remote-code-load 2019-05-14 15:46:15 +08:00
Heyang Zhou
9df3e4af88 Fix http server example. 2019-05-14 00:05:05 -07:00
Heyang Zhou
2963b0a2eb Make schedule() faster. 2019-05-14 00:04:32 -07:00
Heyang Zhou
4f77f4d024 HTTP server example. 2019-05-13 18:37:22 -07:00
bors[bot]
7e00bef6d3 Merge #439
439: doc(runtime-c-api) Add short module descriptions - cont r=syrusakbary a=syrusakbary

This PR supersedes #313 

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Syrus <me@syrusakbary.com>
2019-05-13 23:27:32 +00:00
Syrus
19eba19603 Merge branch 'master' into doc-runtime-c-api
# Conflicts:
#	lib/runtime-c-api/src/lib.rs
2019-05-13 15:55:20 -07:00
bors[bot]
41ae84b0bb Merge #269
269: docs(runtime) Add some better runtime docs r=syrusakbary a=lachlansneff



Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
Co-authored-by: Syrus <me@syrusakbary.com>
2019-05-13 19:32:13 +00:00
Syrus
02d4affd6d Updated changelog 2019-05-13 11:44:44 -07:00
Syrus
8218e550fc Improved docs and fixed few typos 2019-05-13 11:18:57 -07:00
Syrus
5a6cb96714 Merge branch 'master' into docs/better-runtime-docs
# Conflicts:
#	lib/runtime-core/src/vm.rs
2019-05-13 11:08:00 -07:00
Heyang Zhou
884a7e1713 kwasm-net fixes and optimizations. 2019-05-13 10:15:03 -07:00
Heyang Zhou
3bcdfb4263 Asynchronous networking extension. 2019-05-13 06:14:28 -07:00
Heyang Zhou
af1ac9af96 Improve performance of memory access. 2019-05-13 05:11:08 -07:00
bors[bot]
9aac20e215 Merge #432
432: feat(runtime-c-api) Check buffer size before creating the slice, and fix `wasmer_last_error_message` returned value r=Hywan a=Hywan

It's safer to check the buffer size is large enough to hold the error
message before creating the slice from raw parts.

Also, this patch remove the need for `last_error`, simplifying the
code a little bit. The `length` variable is casted to `usize` once.

This patch also updates the returned value of `wasmer_last_error_message` by adding 1, so that it mimics the `wasmer_last_error_length` function that counts the trailing null byte.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2019-05-13 09:00:07 +00:00
Ivan Enderlin
b050144898 Merge branch 'master' into fix-runtime-c-api-error-length 2019-05-13 10:59:11 +02:00
Ivan Enderlin
216e0005b1 chore(changelog) Add #432. 2019-05-13 10:57:32 +02:00
Ivan Enderlin
8c8586faaa test(runtime-c-api) Assert returned value from wasmer_last_error_message. 2019-05-13 10:52:55 +02:00
Ivan Enderlin
bedd305b06 doc(runtime-c-api) Fix inline comment. 2019-05-13 10:52:43 +02:00
bors[bot]
b2227314a7 Merge #436
436: Add deny for unreachable patterns and unused unsafe r=syrusakbary a=bjfish



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-05-12 22:16:44 +00:00
bors[bot]
8130eb1e14 Merge #435
435: Fix f32/f64 conversion, add tests, and rename conversion method r=syrusakbary a=bjfish

Fixes #415

I believe removing this conversion here caused the regression: https://github.com/wasmerio/wasmer/pull/379/files#diff-5e7e23717d05d1d18be5b2e3b75f454dL158

I've added conversion tests and also renamed `NativeWasmType::{to_bits, from_bits}` to `to_binary/from_binary` because it seemed akward to overload the existing `f32::to_bits` method.

Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-05-12 19:29:40 +00:00
Brandon Fish
2aefa731a6 Add deny for unreachable patterns and unused unsafe 2019-05-12 00:33:02 -05:00
Brandon Fish
a96d5cb975 Fix f32/f64 conversion, add tests, and rename conversion method 2019-05-11 19:26:17 -05:00
bors[bot]
8d2a08a1be Merge #430
430: Add some initial deny for unused_imports and unused_variables r=bjfish a=bjfish



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-05-11 15:34:02 +00:00
Brandon Fish
85158ac22a Add some initial deny for unused_imports and unused_variables
Additional unused variable fix on unix

Remove unused import on unix

Remove unused windows import
2019-05-11 09:23:25 -05:00
bors[bot]
fa5402580f Merge #429
429: implement some FS operations for rsign2 r=MarkMcCaskey a=MarkMcCaskey

Get https://github.com/jedisct1/rsign2 working with WASI on Wasmer (for end-to-end tests of wapm)

Current implementation is very hacky, but works!  It should have a couple passes of improvement before shipping

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-05-10 17:59:01 +00:00
Mark McCaskey
02f3349cb1 clean up, update changelog 2019-05-10 10:58:06 -07:00
Mark McCaskey
a527154c62 major improvements to wasi fs calls; include explanation in unimpl!s 2019-05-10 10:54:36 -07:00
Ivan Enderlin
7d2721ef7a fix(runtime-c-api) wasmer_last_error_message returns the length + 1.
Returning the error message's length + 1 mimics the
`wasmer_last_error_length` function that counts the trailing null
byte.
2019-05-10 16:00:13 +02:00
Ivan Enderlin
1d555301f7 feat(runtime-c-api) Check buffer size before creating the slice.
It's safer to check the buffer size is large enough to hold the error
message before creating the slice from raw parts.

Also, this patch remove the need for `last_error`, simplifying the
code a little bit. The `length` variable is casted to `usize` once.
2019-05-10 15:55:02 +02:00
Mark McCaskey
1f99ef8377 implement some FS operations for rsign2 2019-05-09 16:01:36 -07:00
bors[bot]
7f61eafe05 Merge #413
413: Use the new code generator API for LLVM backend. r=syrusakbary a=losfair



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
Co-authored-by: losfair <zhy20000919@hotmail.com>
Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
2019-05-09 20:14:39 +00:00
Brandon Fish
080220c6a7
Merge branch 'master' into feature/llvm-cgapi 2019-05-08 17:33:06 -07:00
bors[bot]
9a831b7aba Merge #428
428: Fix Windows crash on caching compiled artifact. r=syrusakbary a=repi

Memory clone function wasn't able to write to new reserved memory object.

Changed so allocating Memory objects with protection flag allocates commited memory. And added unit test to verify that it doedsn't crash anymore.

Not fully sure this is the best solution though, but fixes this specific clone crash.

Co-authored-by: Johan Andersson <repi@repi.se>
2019-05-08 17:47:18 +00:00
Heyang Zhou
620a6ddd85 Disable memory bound checking for kernel loader. 2019-05-08 10:25:29 -07:00
Johan Andersson
36a78a23b6 Fix Windows crash on caching compiled artifact.
Memory clone function wasn't able to write to new reserved memory object.

Changed so allocating Memory objects with protection flag allocates commited memory.
2019-05-08 15:59:00 +02:00
Brandon Fish
54095fcd67 Clean up commented out code in LLVM codegen 2019-05-07 22:53:48 -05:00