wasmtime 0.3.0

Command-line interface for Wasmtime
Documentation
Post the WASI meeting notes
Collect action items


SIGPIPE in ssp on read from a pipe broken?

Maybe don't do fd randomization if fd 0/1/2 are available.

wasmtime should prohibit fd_renumber from and/or to a preopened resource? or keep them up to date?

validate ri_flags, si_flags, and others don't have unknown flags?
should fd numbers be random? right now it is... kind of (limited by the arbirary buffer size), posix says no

say more about .. and .     and make libpreopen handle foo/../bar

todo: dependencies cycle sanity checking

wasi API changes:

 - the __small_printf patch. (D57620)
    - patch is up; get it reviewed and landed. no need for 8.0 though
    - TODO: add the patch as a custom patch for wasmception (it's just an optimization)
    - TODO: make wasmception do the printf optimization

fix issues that aaron ballman pointed out with the attribute patch

https://github.com/rustwasm/wasm-bindgen/issues/1216#issuecomment-459211377
A better approach is to use a linker-synthesized array.

sqlite:
 - needs file locking.
    - POSIX locking (F_SETLK,F_SETLKW,F_GETLK) is busted because it's
      process-associated.

JSC.js port?

big stuff:
 - rust compile target
 - wasmtime/reference-sysroot argv/argc/preopened-fd system, including preopened files
   - add a way to add directory capabilities in wasmtime. --dir=...? or --cap:dir=...?
   - test that freopen(stdout) freopen(stdin) etc. works
 - network sockets, network demo -- something like yocto?
   - add a way to add network socket capabilities in wasmtime. see SocketAddr in rust for parsin. cloudlibc has no connect... connectat isn't a thing
      - cmdline arg whic says "here's a specific 5-tuple"
         (procotol, source address, source port, destination address, destination port)
        where some of the fields can be wildcards or ranges/sets

finish the work landing typedef fixes: https://github.com/emscripten-core/emscripten/pull/7799

#####

longer term:
 - WASM_SYMBOL_EXPORTED, we should have the ability to set a custom export name

ABI bustedness in 8.0
 - wasm-ld support for emitting start sections isn't in. so hard-code _start for now :-/
 - memory is exported as "memory"
 - "__heap_base" and "__data_end" are exported
 - float128/__FLOAT128__ (not a big problem, fixed post-8.0)
 - C++ can't compile libcxx because of seekoff table signature mismatch
 - passing long double or int128 to varargs doesn't align properly

threads:
 - look at musl's getentropy which is a cancellation point

windows paths:
  - one of the advantages of the capability-oriented system: no absolute paths
  - so, WASI libc provides an abstraction of a single-root absolute-path system, but WASI itself just has relative paths

TODO: cleanup: find lib -name .gitignore