eprintln!("mapcat v{}: mmap() based file concatenation",env!("CARGO_PKG_VERSION"));
eprintln!(" by {} with <3 (licensed GPL3+)",env!("CARGO_PKG_AUTHORS"));
eprintln!();
eprintln!("NOTES:");
eprintln!("The output file is required, if one is not provided, we will just exit with error code `2`. If there are no input files, it will just create an empty output and return with error code `0` (unless there were other errors)");
eprintln!("Output files are always clobbered regardless if there are any inputs, or if the concatenation operation succeeds / fails");
eprintln!();
eprintln!(" (compiled with write parallelisation enabled)");//TODO: we will eventually feature gate the threaded scheduler based solution. but for now, it is the only one implemented so we'll just print this always
std::process::exit(0)
}
fnmain(){
fnmain(){
println!("Hello, world!");
usage()
// todo:
// todo:
// - create and open output file
// - create and open output file
// - open and stat all input files (`job::create_from_file`).
// - open and stat all input files in order (`job::create_from_file`).
// - `fallocate` the output file fd to the sum of all input file sizes
// - `fallocate` the output file fd to the sum of all input file sizes
// - `mmap` the output file as writable
// - `mmap` the output file as writable
//
//
// - spawn the task thread pool
// - spawn the task thread pool
// - dispatch jobs with their fds, stats, and calculated output offsets along with a reference to the output mapped file (`job::Prelude::start`)
// - move the output mapped file to the thread-safe refcounted `state::State`.
// - dispatch jobs to the pool with their fds, stats, and calculated output offsets; along with a reference to the output mapped file (`job::Prelude::start`)