mitsuhiko / mitsuhiko/procspawn

configurable entrypoints

Open
#41 5 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.