-
Notifications
You must be signed in to change notification settings - Fork 10
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
Skip building wasm-opt-sys
when it has already been built
#148
Comments
The lack of caching in the C++ build step is the big disadvantage of how we're building binaryen using only the
Fixing this is possible though not trivial. We could just use We could also attempt to add a caching layer on top of the My preference is to the latter. It's something I would be interested in doing, but I'll need to see whether it's in scope of the funding for this project. |
I've thought a bit about how to add a caching layer on top of the cc crate, and I have not come up with a plan that I think will obviously work. The big obstacle is that we also have to interop with the cxx_build crate, which is itself a wrapper around the cc::Build constructor; and I don't see a way to inject any behavior between cxx_build and cc::Build. cxx_build is pretty simple though so one possibility is to just copy that code and duplicate its behavior. |
I've thought about this some more, and think there may be a way to cache https://github.com/brson/wasm-opt-rs/blob/cache/components/wasm-opt-sys/cc_cache.rs I am feeling wary of actually attempting this since there are so many unknown ways caching a C++ build can go wrong. But idk maybe we'll try it. |
One thing to note is that even if we skip building some C++ files, I don't see any way to avoid rerunning |
There is another potential approach here: sscache already does build caching for rust and C++. It could be possible to automatically acquire sccache and configure it as part of the build script. |
the
build.rs
ofwasm-opt-sys
takes too much timeThe text was updated successfully, but these errors were encountered: