If someone would like to have a hot-reloadable rust functions using cranelift rust backend, how would someone start to implement such a feature? Any links or resources would be appreciated.
cc https://github.com/rust-lang/rustc_codegen_cranelift/tree/wip_hot_code_swapping Be aware however that it crashes after just a couple of reloads as every reload will recompile all functions and memory fragmentation will quickly cause all jitted code to be spread out over more than 2GB of memory, which cranelift-jit doesn't like.
@bjorn3 nice!
2222 commits behind master... any plans to update the branch to current master, any roadmap how to bring functional hot reloading? :)
I guess I will update it at some point. No plans at all for when though. Don't expect it within the next couple of months at least. There are bigger priorities than hot code swapping.
I see... thanks for incredible work.. just tried cranelift backend yesterday on m1 and it compiled big project fine 20% faster then llvm backend.. and it felt much lighter compilation (I guess it's due to less CPU time needed for cranelift).
Last updated: Nov 22 2024 at 16:03 UTC