7 releases (4 breaking)

0.8.0 May 1, 2024
0.7.0 Apr 19, 2024
0.6.0 Mar 29, 2024
0.5.0 Feb 8, 2024
0.4.3 Jan 23, 2024

#250 in Operating systems

Download history 13/week @ 2024-01-16 9/week @ 2024-01-23 5/week @ 2024-02-06 1/week @ 2024-02-13 6/week @ 2024-02-20 13/week @ 2024-02-27 134/week @ 2024-03-26 17/week @ 2024-04-02 164/week @ 2024-04-16 10/week @ 2024-04-23 144/week @ 2024-04-30

318 downloads per month
Used in 5 crates (via maelstrom-worker)

MIT/Apache

44KB
1K SLoC

Maelstrom Worker Child

This is a small library that is only intended to be used by the maelstrom-worker. It is its own library so it can be no_std and we can ensure that it doesn't take any undesired dependencies.

This library is intended to be used in the child processes after a clone syscall in potentially-multithreaded processes. The child process in this case is very limited in what it can do without potentially blocking forever. For example, allocations are disallowed. This library just executes a series of syscalls, the last of which should be execve.

For more information, see the Maelstrom project on GitHub.


lib.rs:

Helper library for maelstrom-worker.

This code is run in the child process after the call to clone. In this environment, since the cloning process is multi-threaded, there is very little that we can do safely. In particular, we can't allocate from the heap. This library is separate so we can make it no_std and manage its dependencies carefully.

Dependencies

~1.5MB
~36K SLoC