]> git.proxmox.com Git - wasi-libc.git/commit
Update to the next version of the `witx` crate (#234)
authorAlex Crichton <alex@alexcrichton.com>
Tue, 23 Feb 2021 18:18:56 +0000 (12:18 -0600)
committerGitHub <noreply@github.com>
Tue, 23 Feb 2021 18:18:56 +0000 (12:18 -0600)
commit2b7e73ae7ac0bad6391d89cc3274a28412243389
treeb1355209d10d1c73aab933c1642db5463ce5932b
parentf2e779e5f1ba4a539937cedeeaa762c1e0c162df
Update to the next version of the `witx` crate (#234)

* Update to the next version of the `witx` crate

* Generate adapter functions instead of simply a header file to have a
  place where adapter code can go.
* Implement adapters in terms of the instructions that the `witx` crate
  tells us about.
* Update the interface of functions to what `witx` expects, notably
  string arguments are now only taken as `char*` and `strlen` happens in
  the adapter function.
* Update defined/predefined/undefined symbol lists for types that have
  been updated.

Some precise generated code has changed but the actual APIs should all
be the same except for the change to not take the length of the string
in the raw WASI call, since idiomatically C doesn't pass the length of
strings around.

Eventually it's expected that the shim functions, while sometimes not
necessary today, will implement more checks and more conversions as
necessary for new APIs.

* Actually update witx submodule

* Comment how to regenerate files

* Tweak name of actual function imports

Make it a bit clearer that they're the ones that we're importing and
calling.

* Update submodule to point to WebAssembly
22 files changed:
Makefile
expected/wasm32-wasi/defined-symbols.txt
expected/wasm32-wasi/predefined-macros.txt
expected/wasm32-wasi/undefined-symbols.txt
libc-bottom-half/cloudlibc/src/libc/fcntl/openat.c
libc-bottom-half/cloudlibc/src/libc/stdio/renameat.c
libc-bottom-half/cloudlibc/src/libc/sys/stat/fstatat.c
libc-bottom-half/cloudlibc/src/libc/sys/stat/mkdirat.c
libc-bottom-half/cloudlibc/src/libc/sys/stat/utimensat.c
libc-bottom-half/cloudlibc/src/libc/unistd/faccessat.c
libc-bottom-half/cloudlibc/src/libc/unistd/linkat.c
libc-bottom-half/cloudlibc/src/libc/unistd/readlinkat.c
libc-bottom-half/cloudlibc/src/libc/unistd/symlinkat.c
libc-bottom-half/headers/public/wasi/api.h
libc-bottom-half/sources/__wasilibc_real.c [new file with mode: 0644]
libc-bottom-half/sources/__wasilibc_rmdirat.c
libc-bottom-half/sources/__wasilibc_unlinkat.c
tools/wasi-headers/WASI
tools/wasi-headers/src/c_header.rs
tools/wasi-headers/src/lib.rs
tools/wasi-headers/src/main.rs
tools/wasi-headers/tests/verify.rs