27 Commits (master)

Author SHA1 Message Date
Avril f4f7aafa32
Feature-gated `-exec/{}` as "exec". Added feature `mode-flags` to enable/disable collect-noallocate collect-preallocate memfile-total-jemalloc.png features that involve runtime flags.
1 year ago
Avril 5c673ae3c4
-exec/{} feature is ready to merge
1 year ago
Avril 582bfc0dad
Made -exec (stdin ver) work via piping hack (XXX: We need to find how to pass file directly.) (TODO: -exec{} still doesn"t work: `No such file or directory` error when accessing /dev/fd/{fd} *and* /proc/{pid}/{fd}?? Idk why...
1 year ago
Avril bc121420b8
Chenged return type of `spawn_from_sync()` to be an iterator of `Result<Option<i32>>` so the caller can decide what to do if the child terminates without an exit code. Also changed to `eyre::Result<>` to report the specific failure and child process" index.
1 year ago
Avril 79721444ba
Implemented `-exec/{}` implementation functionality.
1 year ago
Avril 715fa4d5a8
Added simple fatal error message verbosity levels controllable by environment variable at runtime (`RUST_VERBOSE =~ /1|v|verbose/i`), and compile-time (`NO_RT_ERROR_CTL`, `DEFAULT_ERROR =~ /1|v|verbose/i`.) Default is simple error messages at compile and runtime.
2 years ago
Avril 227abc0d7d
args: Added visitor-pattern argument parsing. Fixed bug in `try_parse_for!()` which `continue`d on the wrong branch. Improved specific and general error messages regarding arguments. Parsing for `-exec/{}` works! A correct `Options` struct is produced, edge-and error- cases are handled correctly with informative messages (TODO: Implement `--help`.)
2 years ago
Avril 177bf3c4ff
main: Added `parse_args()`: Parses args, converts error to eyre::Report, and adds section for suggestion (TODO: Implement `--help`) and section on which args existed.
2 years ago
Avril 682cd8ec15
args::Option::ExecMode Started argument parsed data structure for `-ecec <command> [<args>...]` (Stdin) `-exec{} <command> [<args>|{}...]` (Positional `"/prof/self/fds/{}" (3++)`).
2 years ago
Avril 6220233d97
Preparation for adding the command-line option `-exec` and `-exec{}`.
2 years ago
Avril 14f32d6262
Explicitly closes `stdout` before process exits.
2 years ago
Avril bc2357c6b6
Attempted to add new feature flag: `memfile-size-output`: Which will pre- or post- set the size of `stdout` to the correct buffer size, allowing consumers of `collect`"s stdout pipe to know the size just like a file. However, `ftruncate()` always fails on stdout. Before re-enabling the feature, we must find out how to set the size of a pipe, if/when you even can, and what syscall(s) you need to do it with.
2 years ago
Avril 395799587b
Removed `stackalloc` dependancy.
2 years ago
Avril 9b4bb475c0
Added extension methods for flattening `eyre::Result<eyre:Result<T>>`s and related constructs.
2 years ago
Avril 0262ca88d9
Added TODOs for specific bugs (and impl related ideas for how to go about preventing/warning in the event of `mode-memfd` system OOM) ; moved some RawFd-related functions into a submodule
2 years ago
Avril 515a63c3a2
Fixed bug with `memfile` feature not setting stream length properly without `memfile-preallocate`
2 years ago
Avril 23d022b5fe
Added working memfile implementation
2 years ago
Avril 0628853b43
Working memfile implementation
2 years ago
Avril edb57c7c95
memfile: Disambiguated memfile errors resulting in `fallocate()` sizes being too large or the call itself failing.
2 years ago
Avril b3dbb30deb
Fix imports for when feature `memfile` is disabled.
2 years ago
Avril ed957bcec8
feature memfile: added `RawFile::open_mem()`
2 years ago
Avril 65c297b228
Started adding `memfile` feature: Use a `memfd_create()`d in-memory temporary file.
2 years ago
Avril 80a2d65262
Made spantrace capture optional at the compilation level.
2 years ago
Avril cc37f604f1
Fixed tracing causing huge unneeded bottleneck in non `bytes` builds.
2 years ago
Avril bea5cda4a1
Fixed not copying to buffer when not using feature `bytes`.
2 years ago
Avril 1cdd5b2187
Made `bytes` an optional feature.
2 years ago
Avril a5ad02a6de Working primitive, slow, prototype.
2 years ago