Option to specify config.toml path
vsndev3 opened this issue · comments
Is it possible to have a command line option to specify config.toml path or a global config that takes a user specified directory as root for all configuration. This way the IRust can be packed and shared as a single self-contained directory (planning rust tool chain + zig for compiler)
There are a couple of places that uses the host system
Also the repls are stored in host temporary directory (and some commands like :dbg uses it)
I'm not sure if there is a compelling enough usecase to warrent to make all those configurable, though its not that big of a change
irust can be already shared as self contained binary but I think you mean a binary that doesn't use the host system, but there is a flatpak build that does this already https://flathub.org/apps/io.github.sigmasd.IRust
Thanks for the response. For me its an embedded environment, so flatpack cannot be used. However please consider something like https://github.com/rust-cli/confy where config can be loaded first from local dir if not load from system specific path. I guess I have to patch my local repo for now.
I see, lets keep this open, either way the code changes shouldn't be that big so I don't have a big problem adding this feature, feel free to open a pr
I prefer to not add a dependencies on confy, this feature is simple enough, it can be coded here
@vsndev3 I added this feature in this branch https://github.com/sigmaSd/IRust/compare/idirs?expand=1
All the paths used by irust are configurable with env variables
If that works for you I can merge this
It works perfectly, Thanks
I pushed irust 1.71.22 with this patch