13 releases (breaking)

new 0.14.0 Mar 21, 2025
0.12.0 Sep 12, 2024
0.11.0 Jul 30, 2024
0.6.0 Mar 29, 2024

#633 in Rust patterns

Download history 17/week @ 2024-11-27 31/week @ 2024-12-04 46/week @ 2024-12-11 13/week @ 2024-12-18 3/week @ 2024-12-25 22/week @ 2025-01-08 19/week @ 2025-02-05 26/week @ 2025-02-12 125/week @ 2025-02-19 47/week @ 2025-02-26 15/week @ 2025-03-05 24/week @ 2025-03-12

211 downloads per month
Used in 8 crates (via maelstrom-worker)

MIT/Apache

75KB
2K 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

~0.3–0.8MB
~19K SLoC