Skip to content

Commit

Permalink
Default to finding everything, not necessarily under a mods/ folder
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Dec 5, 2024
1 parent 20a8d59 commit 6115afc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions dylo-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const DYLO_RUNTIME_VERSION: &str = "1.0.0";
struct ModInfo {
/// human-readable name of the mod, extracted from the directory name (without mod- prefix)
name: String,
/// location of the mod's implementation code ($workspace/mods/mod-$name/)
/// location of the mod's implementation code ($workspace/mod-$name/)
mod_path: Utf8PathBuf,
/// destination path for generating consumer version ($workspace/mods/$name/)
/// destination path for generating consumer version ($workspace/$name/)
con_path: Utf8PathBuf,
/// timestamp of most recently modified file in mod directory
mod_timestamp: SystemTime,
Expand All @@ -36,7 +36,7 @@ enum ProcessReason {
Modified,
}

/// Discover all mods in the `mods/` directory.
/// Discover all mods in the `./` directory, recursively
fn list_mods(mods_dir: &camino::Utf8Path) -> std::io::Result<Vec<ModInfo>> {
let mut mods = Vec::new();
for entry in fs_err::read_dir(mods_dir)? {
Expand Down Expand Up @@ -761,7 +761,7 @@ fn main() -> std::io::Result<()> {
}

let args = parse_args();
let mods_dir = Utf8Path::new("mods");
let mods_dir = Utf8Path::new(".");

let mut mods = list_mods(mods_dir)?;
tracing::info!("🔍 Found {} mods total", mods.len());
Expand Down
2 changes: 1 addition & 1 deletion dylo-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
However, this is the right place to learn about environment variables that will impact the
behavior of dylo-runtime:

* `DYLO_TARGET_DIR`: Set the build directory for hot-reloadable plugins. By default, plugins are built into `$HOME/.con-mods/{mod-name}` or `%USERPROFILE%\.con-mods\{mod-name}` on Windows.
* `DYLO_TARGET_DIR`: Set the build directory for hot-reloadable plugins. By default, plugins are built into `$HOME/.dylo-mods/{mod-name}` or `%USERPROFILE%\.dylo-mods\{mod-name}` on Windows.

* `DYLO_BUILD`: Set to "0" to disable automatic mod compilation. Defaults to "1".
Set to "verbose" to have cargo inherit stdout/stderr, which will show progress messages
Expand Down
2 changes: 1 addition & 1 deletion dylo-runtime/src/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn get_target_dir(mod_name: &str) -> std::path::PathBuf {
.expect("Neither HOME nor USERPROFILE environment variables are set");

std::path::PathBuf::from(home_dir)
.join(".con-mods")
.join(".dylo-mods")
.join(mod_name)
}

Expand Down

0 comments on commit 6115afc

Please sign in to comment.