implement PathSearcher

to facilitate module reloading
This commit is contained in:
Andy Weidenbaum
2021-02-26 19:57:13 +11:00
parent a331b2bf8b
commit cf3a90faca
5 changed files with 209 additions and 2 deletions

6
src/utils.rs Normal file
View File

@@ -0,0 +1,6 @@
use std::path::PathBuf;
/// Return the value of `$CARGO_MANIFEST_DIR` at runtime.
pub(crate) fn runtime_root() -> PathBuf {
PathBuf::new().join(std::env::var("CARGO_MANIFEST_DIR").unwrap())
}