-
Notifications
You must be signed in to change notification settings - Fork 123
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
[WIP] Use prebuilt skia static link to reduce build time #57
Conversation
@Brooooooklyn These linker errors on the CI seem to occur for C++ methods that are defined in the header files. Looking at the build script in the Skia repository, I was missing the flag that prevents inlining, so I think you need to generate the prebuilt libs with I am not sure why it works on your notebook though. |
24fb581
to
898dde2
Compare
Windows build still failed... I couldn't find reason |
4d37e5e
to
18bf9c8
Compare
@Brooooooklyn Regarding Windows: Add a Several notes about this PR:
Regarding the prebuilt-binaries, I think we need to compute a key string or a hash over such a string for each platform to match & locate them. This key should include:
So effectively I am asking for a merge of the repository and the possibilities you use to build the Skia binaries with this one. For a first step, we could use this PR as it is, but instead of panicing when the prebuilt binaries are not available, check out and do a full Skia build. Then, we can try to integrate the code you built to deploy the prebuilt binaries with the extended matching requirements. |
483ffa3
to
ccb7bd2
Compare
ccb7bd2
to
0f9a3b6
Compare
Renamed this PR as Work In Progress. |
Maybe we can create a new pkg named use rust_skia_build::{Arg, build};
fn main() {
let arg = Arg {
gn_args: "xxxx",
download_third_parts: true,
....
};
build(arg).unwrap();
} In the |
@Brooooooklyn If you don't mind, I'd like to give an integration a shot. After all, you have done the heavy lifting already. But I will likely have to delay working on that for about two weeks because of two other projects and a planned vacation.
Yes, as I can see from your azure script, it's possible to use a different repository for that. So what I would like is to produce the releases for every successful build on the master branch here and upload it to the Releases section to an empty repository.
No, for a first attempt I would really like to always fall back to the full build. Additional customization options for Skia could be provided through an environment variable. I hope this can be aligned with your plans, if not, please state why. Then, when we generate a Cargo release package, we don't supply the Skia submodule, but will check it out and build it when the available downloads do not match Key of the Cargo release. Technical Details (a bit more revised compared to my post before):
We will encounter situations for which a Key matches, but the downloaded Skia or SkiaBindings library will not be able to be used, for example, because of system library dependency that has changed. We will fix them as they come in by integrating additional versions / hashes to the packages' Keys. Going over the packages in https://github.com/rust-skia/skia/releases, I have a question: Why are |
Sorry for the delay to reply your comment, I've been busy these days.
Yes, I don't mind.
I agree with this point.
I am afraid control the skia build by pass some enviroment variables is not flexiable enough. What I mean in the code snippet below, the use rust_skia_build::{Arg, build};
fn main() {
let arg = Arg {
gn_args: "xxxx",
download_third_parts: true,
....
};
build(arg).unwrap();
} What I proposal is encapsulating the About prebuld the |
Ok, I agree, this is a good thing to do. We'll try to provide a separate rust library for the build support.
It is different. It's also different because of the the system headers used in the build, which means the compiler, the cpu architecture and even the operating system's version may all affect the build result. But so is the Skia library. Which means that if we provide a prebuilt Skia library we must also provide the matching |
Don't know why I can build and run in my Macbook pro, but all failure in CI.
Do you have any idea? @pragmatrix