Open drahnr opened 7 months ago
Hello! This is not a fork of sccache, but the main idea is quite similar. Forklift is made specifically for Cargo caching, taking into account how Cargo builds rust code. The main difference should be the ability to cache any type of crate and do not use the absolute path, so multiple projects could share the cache (not fully implemented yet). Also, the server process is a bit "smarter" and it does some calculations, like tracking if a dependency of the current crate has already been rebuilt and we don't even need to check if cache is available. Native deps and build_script output is currently not cached, but that's the main next planned feature
Well aware it's not a fork.
Note that abs paths would be fixable upstream, see https://github.com/paritytech/cachepot/pull/116
How do you do the mapping from rust invocation to output? How do you handle dependencies to other files and env? It appears to me that's a lot of logic reimplementation, no?
I am a bit confused on what you refer to as checking if it exists, it still needs to be fetched if it exists.
So, looking at the code, I fail to see how you handle any dependencies that are not explicitly given. I.e.
build.rs
artifact outputs as lib input dependencies, a special case of include_bytes!
.I'd be happy to see how you solved these problems? Or are they not a concern for forklift
?
Hey, I just stumbled upon this project. It appears to be a subset of #mozilla/sccache iiuc. Could you outline the difference in particular for rust projects? How do you handle c library dependencies?