I suggest using https://github.com/smoltcp-rs/smoltcp, seeing as it is quite well developed, and that other OSes have used it (although I suppose they have more control over their syscall interface). I think a first step would be getting an example to run on the kernel level before exposing some syscalls.