wasi-libc/libc-bottom-half
Dan Gohman cf366c06d1 Optimize lseek in the tell case.
`lseek(x, 0, SEEK_CUR)` has no effect other than to return the current
file offset. The patch here uses a macro with `__builtin_constant_p` to
recognize this case and rewrite it to a library call that uses `fd_tell`
rather than `fd_seek`, so that programs that don't need actual seeking
don't end up importing `fd_seek`.

This is also the first usage of `__wasi_fd_tell` in WASI libc, so this
adds it to undefined-symbols.txt.
2019-04-30 16:19:05 -07:00
..
cloudlibc Optimize lseek in the tell case. 2019-04-30 16:19:05 -07:00
crt WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
headers Optimize lseek in the tell case. 2019-04-30 16:19:05 -07:00
libpreopen Remove capsicum.h; WASI libc doesn't support that API, even internally. 2019-04-23 15:01:05 -07:00
mman WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
sources Optimize lseek in the tell case. 2019-04-30 16:19:05 -07:00
README.md Update to cloudlibc 8835639f27fc42d32096d59d294a0bbb857dc368. 2019-04-15 09:49:02 -07:00

"WASI" the WebAssembly System Interface.

WASI libc is conceptually the lower half of a traditional libc implementation. It provides C interfaces to the low-level WASI syscalls.

This is largely based on CloudABI, cloudlibc, and libpreopen, however we use just the low-level syscall wrappers rather than all of cloudlibc and libpreopen, and we have several customizations for use in a WebAssembly sysroot.

The upstream repositories and versions used here are:

cloudlibc - https://github.com/NuxiNL/cloudlibc 8835639f27fc42d32096d59d294a0bbb857dc368 libpreopen - https://github.com/musec/libpreopen 8265fc50b9db3730c250597bdd084f1e728f3e48

Whole files which are unused are omitted. Changes to upstream code are wrapped in preprocessor directives controlled by the macro __wasilibc_unmodified_upstream, except that CloudABI names have also been renamed to WASI names without annotations.

WASI libc currently depends on the basics and dlmalloc components of reference-sysroot.