Open elichai opened 5 months ago
With this things like #83 become much easier
@matklad Thank you for the thorough feedback and review!
This should not be a performance bottleneck. You use xshell to read files and/or run externall processes. The relevant systcalls should dwarf any nanoseconds we spend on allocation and memcpying
Yeah I was going back and forth a lot trying to find a "good" common ground between cloning everything and having a simple API and library :)
Hi, I'm back from a long vacation :) pushed a small update, if you're Ok with the direction I can soon find time to work on updating tests and examples to better show the intended use-cases
As discussed in #84 this refactors the API to replace RAII based pushd/popd into subtree like structure where you get a subshell by cloning/
push_dir
.This is a draft for an initial implementation, I'm also playing with the idea of having our own
trait AsOsStr
with some kind of private enum like:that way things like
sh.env("foo", "bar")
will not do any heap alloctation aside for pushing into the hashmap