#process #create #running

zygote

A zygote process is a small process used primarily to create new processes

3 releases

0.1.2 Jan 17, 2025
0.1.1 Dec 18, 2024
0.1.0 Dec 17, 2024

#171 in Operating systems

Download history 336/week @ 2024-12-15 70/week @ 2024-12-22 174/week @ 2025-01-12 255/week @ 2025-01-19 435/week @ 2025-01-26 561/week @ 2025-02-02 590/week @ 2025-02-09 599/week @ 2025-02-16 617/week @ 2025-02-23 428/week @ 2025-03-02 480/week @ 2025-03-09 163/week @ 2025-03-16

1,763 downloads per month
Used in 2 crates

Apache-2.0

36KB
744 lines

zygote

zygote is a library to create zygote processes on linux. A zygote process is a small process used primarily to create new processes, but can be used for anything that requires running things in a separate process.

To learn more about zygote processes check out these notes on Chromium.

Getting started

use zygote::Zygote;
fn main() {
    Zygote::init();
    let pid = Zygote::global().run(|_| std::process::id(), ());
    assert_ne!(pid, std::process::id());
}

lib.rs:

zygote is a library to create zygote processes on linux. A zygote process is a small process used primarily to create new processes, but can be used for anything that requires running things in a separate process.

To learn more about zygote processes check out these notes on Chromium.

Getting started

fn main() {
    Zygote::init();
    let pid = Zygote::global().run(|_| std::process::id(), ());
    assert_ne!(pid, std::process::id());
}

Dependencies

~2.2–3MB
~64K SLoC