New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic implementation of hot-loading/mods #95
Conversation
Conflicts: Cargo.toml
I'll test this on a Windows 10 64-bit laptop in the afternoon. Impressive work! |
Great work! FYI: on Mac, everything compiles, but I get this error on startup, which I don't really understand:
I can't find this |
@aeickhoff That's weird, could you try to remove Edit: I think that these objects come from |
lib/weaver/src/weaver.rs
Outdated
return Err(format!("module does not exist {:?}", path)); | ||
} | ||
if !path.is_file() { | ||
return Err(format!("module does not a file {:?}", path)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be, "module is not a file ..."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, fixed 😄
Tried that, got the same error as above. |
@aeickhoff Okay, I'm fairly certain that the error is because the library is not in your path. You should be able to verify it with |
By setting also, FYI: Mac doesn't recognise the |
That's great! I think I will make it so that the ld option only runs on *nix. The crash on exit is a bit worrying, it might be either because of this: https://github.com/citybound/citybound/pull/95/files#diff-98e384c6f9803e1156e01ae31bb92c57R163 or because of this: nagisa/rust_libloading#5 |
@chances Just to make it more obvious that we are talking about the root of everything. Kind of like URLs. We could also make it so that a single forward slash refers to the root of the current source. It's definitely something we should discuss more to find something that works the best. |
Archiving this for now, I'll include you guys in discussion regarding the new mod-from-inside-the-game idea when it's time! |
Addresses parts of #93.
What I've done:
How to use:
cargo run
.my mod was loaded!
in the terminal.What's missing:
Loading of whole directories of mods.Dependencies, and loads of other things.This is just a first prototype though, but I wanted to put it up to get some feedback before I continue.