mitsuhiko / mitsuhiko/procspawn
configurable entrypoints
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Rust
- Stars
- 166
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to have something like this:
In setup code:
fn main() {
// stand-in for real isolation, could set up seccomp, fork off and re-exec ourselves again using e.g. https://github.com/containers/bubblewrap or systemd-run or whatever
procspawn::init_config("isolated", || libc::setuid(1000));
// This is the default config
procspawn::init();
Then, in the client code we can conveniently dispatch into these distinct process configurations:
// A task we want to be isolated; e.g. fetch a URL via HTTP, or perform some computation, or whatever
procspawn::spawn_config("isolated", || reqwest::get("https://example.com"));
// A task which runs with default process privileges
procspawn::spawn(|| std::fs::write("/etc/someconfig.conf", "somevalue"));
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing procspawn::init and procspawn::spawn entry points and the issue's examples for procspawn::init_config and procspawn::spawn_config. Determine how named process configurations should be registered and dispatched, including the proposed isolation setup, then verify that both configured and default tasks work as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100