Commit Graph

10 Commits

Author SHA1 Message Date
Dan Gohman
a679412dd0 Sync with lucet-wasi (#106)
* Open /dev/null for writing as well as reading.

Port this fix to wasi-common:

b905c44483

* Remove all remaining uses of `std::mem::uninitialized`.

Patch inspired by:

2d6519d051

* Replace libc::memcpy() calls with std::ptr::copy_nonoverlapping()

Port this fix to wasi-common:

a3f3a33e9b

* Pass `WasiError` by value.

It's a `u16` underneath, so we can pass it by value.

* Avoid unnecessary explicit lifetime parameters.

* Use immutable references rather than mutable references.

Patch inspired by:

54baa4c38c
2019-09-30 19:22:11 +02:00
Dan Gohman
34db7f0150 Update to syn 1 and quote 1. 2019-09-09 16:33:32 +02:00
Jakub Konka
5aa598520c Rename C prefix from __wasi to wasi_common_ 2019-05-15 13:57:06 -07:00
Jakub Konka
52eda1498a Correctly unpack &mut [T] into *mut T and usize 2019-05-15 13:57:06 -07:00
Jakub Konka
006198eb92 Generate C bindings for all hostcalls 2019-05-15 13:57:06 -07:00
Jakub Konka
9ad16cc702 Add sanity tests 2019-05-15 13:57:06 -07:00
Jakub Konka
7f3c325cdf Dereference pointers and call the hostcall fn 2019-05-15 13:57:06 -07:00
Jakub Konka
4a5910b4a3 Capture correct return type 2019-05-15 13:57:06 -07:00
Jakub Konka
7791166859 Generate C fn name prefixed with __wasi_ 2019-05-15 13:57:06 -07:00
Jakub Konka
e552b19dfe Add placeholder for cbindgen proc_macro_attribute 2019-05-15 13:57:06 -07:00