You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first I'd like to thank you for this project!
This issue is a feature request that would make the usages of cargo commands compatible with the sccache (caching for compilation).
I'm using your rust integration for jupyter labs, and I have confirmed that after installing https://github.com/mozilla/sccache (via cargo install sccache) and setting export RUSTC_WRAPPER=sccache before starting jupyter, the compilation calls indeed are sent to sccache - but for some reason they can't be cached - observed via watch sccache --show-stats.
I think the kernel restarting should not be a problem for sccache, since cargo clean on normal projects still benefit from sccache, and also regarding normal projects, different projects (different name on different paths) also benefit from the caching of external libraries from other projects.
I also tried manually running cargo rustc -- -C prefer-dynamic --error-format json on /tmp/.tmpza75ej/evcxr_meta_module and also on other user_code_x directories and they appear to use scchache correctly.
But somehow, when jupyter asks for it's execution, they fall as "Non-cacheable calls" on the sccache stats and thus are never cached. I don't know what is causing this behaviour.
I think compilation caching could be very welcome for the rust+jupyter use-case, since the initial compilation duration is quite apparent whenever a couple of crates are used.
Since the same target directory is being used for every cell from the same notebook, there is already some standard caching. But if evcxr were compatible with scchache, I think it'd be a boost for first-runs and also for the multi-notebook case.
The text was updated successfully, but these errors were encountered:
Thanks for the excellent suggestion. Sorry it took me a while to get to it. Looks like the issue was that evcxr was setting CARGO_TARGET_DIR. Fortunately, I recently switched evcxr from a crate per eval to a single crate, which made setting CARGO_TARGET_DIR unnecessary.
I've also added explicit integration, which I figured might be easier than having to set the environment variable.
Hello, first I'd like to thank you for this project!
This issue is a feature request that would make the usages of
cargo
commands compatible with thesccache
(caching for compilation).I'm using your rust integration for jupyter labs, and I have confirmed that after installing https://github.com/mozilla/sccache (via
cargo install sccache
) and settingexport RUSTC_WRAPPER=sccache
before starting jupyter, the compilation calls indeed are sent to sccache - but for some reason they can't be cached - observed viawatch sccache --show-stats
.I think the kernel restarting should not be a problem for sccache, since
cargo clean
on normal projects still benefit from sccache, and also regarding normal projects, different projects (different name on different paths) also benefit from the caching of external libraries from other projects.I also tried manually running
cargo rustc -- -C prefer-dynamic --error-format json
on/tmp/.tmpza75ej/evcxr_meta_module
and also on otheruser_code_x
directories and they appear to use scchache correctly.But somehow, when jupyter asks for it's execution, they fall as "Non-cacheable calls" on the sccache stats and thus are never cached. I don't know what is causing this behaviour.
Here's a rust-specific info from sccache: https://github.com/mozilla/sccache/blob/master/docs/Rust.md
If you'd like more info, please let me know!
I think compilation caching could be very welcome for the rust+jupyter use-case, since the initial compilation duration is quite apparent whenever a couple of crates are used.
Since the same target directory is being used for every cell from the same notebook, there is already some standard caching. But if evcxr were compatible with scchache, I think it'd be a boost for first-runs and also for the multi-notebook case.
The text was updated successfully, but these errors were encountered: