-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Hot code replacement #6381
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
Comments
It is really, extremely hard to do this with native code, especially in a cross-platform fashion. VMs have an easier time because they have full control over bytecode loading, code generation, code placement, etc. |
I am not up-to-date on the latest research on the topic, but I found Kitsune: Efficient, General-purpose Dynamic Software Updating for C (OOPSLA 2012) interesting. |
visited for triage, 17 July 2013. Hot-swapping is indeed tricky, though some of the things necessary to support it (e.g. marking pages as executable; I-cache flushing, etc) would also be necessary to support a JIT compiler. I suspect we'd also need position-independent code (PIC). The Kitsune paper actually covers even more aggressive transformations, e.g. migrating the data layouts between versions. (I have only skimmed that paper at this point.) |
This would be cool, but I feel comfortable saying it's probably not going to happen. I think there are many other difficult problems that are more compelling. |
It was done a few times with compiled code through LLVM and its JIT. Which throws it into a VM and allows to do the same stuff Erlang can do inside its VM... If somebody wants to use a Low Level VM I guess they can do it in Rust too... For something like that to work you need to add the VM behavior anyway... |
I will add this only for reference http://runtimecompiledcplusplus.blogspot.co.uk/ and the code https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus |
… r=ebroto Add lint size_of_in_element_count Fixes rust-lang#6381 changelog: Add lint to check for using size_of::<T> or size_of_val::<T> in the count parameter to ptr::copy or ptr::copy_nonoverlapping, which take a count of Ts (And not a count of bytes) - \[X] Followed [lint naming conventions][lint_naming] - \[X] Added passing UI tests (including committed `.stderr` file) - \[ ] `cargo test` passes locally - \[X] Executed `cargo dev update_lints` - \[X] Added lint documentation - \[X] Run `cargo dev fmt` [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints Running `cargo test` locally fails with this error: ``` running 1 test test fmt ... FAILED failures: ---- fmt stdout ---- status: exit code: 1 stdout: stderr: error: unable to unlink old fallback exe error: caused by: Access is denied. (os error 5) thread 'fmt' panicked at 'Formatting check failed. Run `cargo dev fmt` to update formatting.', tests\fmt.rs:32:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failures: fmt test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ``` But I did run `cargo dev fmt`
Hi I watched this http://www.youtube.com/watch?v=apZYqHPqzYo and thought it would be nice to have hot code replacement in Rust as well.
In Java, you have the OSGi project ( http://www.osgi.org/Main/HomePage ) and hotswap ( http://code.google.com/p/hotswap/ ), which facilitates upgrading and changing modules of your application without touching other modules.
The text was updated successfully, but these errors were encountered: