Commit ad08dd9
authored
Cleanup wasm32-wasi target (#306)
* Cleanup wasm32-wasi target
This change ensures that we only compile our WASI implementation for
32-bit targets. The interaction between the WASI proposal and the
memory64 proposal is not yet clear, [wasmtime does not yet support](
bytecodealliance/wasmtime#3594 (comment))
using WASI with memory64, and many of the interfaces use 32-bit values
for pointers.
This change also reduces the use of `unsafe` from the wasi
implementation. As noted in #253, changes to `Errno` mean that we can't
get the error message from the raw error code, but we can avoid using
unsafe when converting this code to a NonZeroU32. This handling also
makes WASI behave more like our other targets, which also manually check
that errno is non-zero.
Signed-off-by: Joe Richey <joerichey@google.com>
* Disable default features for WASI crate
Similar to this crate, the `wasi` crate just uses a `std` feature to
implement `std::error::Errno`, which we don't use.
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>1 parent d87d339 commit ad08dd9
3 files changed
+14
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
0 commit comments