Simple one file zig library for mounting on linux
It does not spawn child processes, it uses the modern linux mount api.
Info, warning and error messages are loged through std.log, in the mount scope, and therefore you can set what level do you want to see through std.option
pub const std_options: std.Options=.{
log_scope_levels=&.{
.{.scope=.mount, .level=.err},
}
};mount name /mountpoint -t overlay -o ro,relatime,lowerdir=/lower,upperdir=/upper,workdir=/worktry mount.mount("name", "/mountpoint", "overlay", &.{
.{ "lowerdir", "/lower" },
.{ "upperdir", "/upper" },
.{ "workdir", "/work" },
}, &.{"ro", "relatime"});mount /src /target --bindtry mount.bind("/src", "/target");