At a quick glance, the following functions are not yet provided by nix, but would be useful to have in nix for use by wasi-common: mkdirat, unlinkat, renameat, linkat, clock_getres, clock_gettime, posix_fallocate, posix_fadvise.
Currently code in wasi-common and lucet-wasi is calling libc interfaces for these functions directly, which requires unsafe code. Having nix provide these will mean the unsafe code is shifted to nix instead. This may not seem like a win on a theoretical level, but the more we can push unsafe code into dedicated utilities that do simple unsafe things with safe, testable, interfaces, the easier it is to audit everything.
I've marked this as "help wanted" -- this is not an urgent project, but it is a nicely scoped, straightforward, and subdividable project, and it's a good chance to see some of the low-level parts of the software stack that wasi-common is built on. And mentoring is available :-).
Additional resources:
At a quick glance, the following functions are not yet provided by
nix, but would be useful to have innixfor use by wasi-common:mkdirat,unlinkat,renameat,linkat,clock_getres,clock_gettime,posix_fallocate,posix_fadvise.Currently code in wasi-common and lucet-wasi is calling libc interfaces for these functions directly, which requires unsafe code. Having
nixprovide these will mean the unsafe code is shifted tonixinstead. This may not seem like a win on a theoretical level, but the more we can pushunsafecode into dedicated utilities that do simple unsafe things with safe, testable, interfaces, the easier it is to audit everything.I've marked this as "help wanted" -- this is not an urgent project, but it is a nicely scoped, straightforward, and subdividable project, and it's a good chance to see some of the low-level parts of the software stack that wasi-common is built on. And mentoring is available :-).
Additional resources:
nix, though the functions above are more complex and will need testcases :-).