Add Rust impl of wasmtime_ssp_fd_prestat_get

In more detail, this commit:
* makes fd_prestat_get safe
* rewrites fd_prestats_get_entry in (safe) Rust
* creates helper macros for rwlock read lock and unlock
This commit is contained in:
Jakub Konka
2019-04-30 21:20:50 +02:00
committed by Dan Gohman
parent b0eab7398d
commit 5c555406ca
7 changed files with 67 additions and 44 deletions

View File

@@ -20,8 +20,10 @@ fn main() {
.whitelist_function("fd_prestats_init")
.whitelist_function("fd_prestats_insert")
.whitelist_function("argv_environ_init")
.whitelist_function("rwlock_.*")
.whitelist_type("__wasi_.*")
.whitelist_type("fd_table")
.whitelist_type("fd_prestat")
.whitelist_type("fd_prestats")
.whitelist_type("argv_environ_values")
.whitelist_var("__WASI_.*")