Before submitting
Problem or use case
Cage has 18 fields and no constructor. Every site that needs one writes out the full literal by hand. There are three today, and #1338 adds a fourth:
Today's design will cause adding a field to Cage breaks unrelated crates' tests. With #1338 merged, a new field in src/cage/src/cage.rs fails to compile typemap's test suite.
Proposed solution
Add a constructor to the cage crate. For example:
impl Cage {
/// Creates a cage with the given identity and cwd; every other field
/// starts empty/zeroed.
pub fn new(cageid: u64, parent: u64, cwd: PathBuf) -> Self { ... }
}
Alternatives considered
No response
Additional context
No response
Before submitting
Problem or use case
Cage has 18 fields and no constructor. Every site that needs one writes out the full literal by hand. There are three today, and #1338 adds a fourth:
Today's design will cause adding a field to Cage breaks unrelated crates' tests. With #1338 merged, a new field in src/cage/src/cage.rs fails to compile typemap's test suite.
Proposed solution
Add a constructor to the cage crate. For example:
Alternatives considered
No response
Additional context
No response