mitsuhiko / mitsuhiko/procspawn
pass fn item pointers?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 166
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
I am working on some code for testing an external binary, and it's useful if every test runs in a temporary directory as a subprocess so that . is a tempdir.
I wrote
https://github.com/cgwalters/with-procspawn-tempdir/
but realized that it'd be simpler if I had my test framework allocate the tempdir outside of the test. So I tried to send across the test function pointer fn() -> Result<()> across procspawn::spawn but of course it's not serializable.
But this library is effectively doing that "fn pointer" serialization for the function provided to spawn; could we make the MarshalledCall bits a public API like: procspawn::ThisProcessFn that was serializable with serde?
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 procspawn::spawn API and the internal MarshalledCall implementation, then compare the requested ThisProcessFn serde behavior with the external with-procspawn-tempdir use case. Determine the public API and serialization design needed to pass a test function across a subprocess; done means the documented representation works for that scenario without exposing an unstable internal detail.
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
- 35/100