rust-skia icon indicating copy to clipboard operation
rust-skia copied to clipboard

file:// SKIA_BINARIES_URL

Open zdufour-asp opened this issue 2 years ago • 1 comments

Hi y'all, thanks to whoever reads this :)

This comment says that file:// is supported for SKIA_BINARIES_URL, but I'm getting an "unknown scheme" error when using file://./skia-binaries.tar.gz / file://skia-binaries.tar.gz

https://github.com/rust-skia/rust-skia/blob/9f9f03029eab651b708a2260c116ab7a8e0fe68c/skia-bindings/build_support/binary_cache/env.rs#L16-L19

Is there a simple way to enable this? I have 0 rust experience, so I'm not really capable of contributing a PR, but I'm guessing this might be where a conditional would need to be added:

https://github.com/rust-skia/rust-skia/blob/661a0bcb3a0bbb34969fb9829904759dbf5cfe81/skia-bindings/build_support/binary_cache/utils.rs#L5-L6

workaround

A workaround is to use a file-server (e.g. python -m http.server):

  1. Download the binary release from your platform (the github.com/.../releases/skia-binaries...tar.gz in your output, not the codeload.github.com file)
  2. in a separate terminal window/tab, navigate to your downloads folder and python -m http.server
  3. Wherever you were trying to do stuff earlier,
SKIA_BINARIES_URL=http://localhost:8000/name-of-the-file-you-downloaded.tar.gz whatever-cargo-build-stuff-you-were-doing

zdufour-asp avatar Sep 01 '22 18:09 zdufour-asp

Hi, thank you for writing this up. There is already an untested PR #645 that implements that.

Also #644.

pragmatrix avatar Sep 02 '22 06:09 pragmatrix

file:// support for SKIA_BINARIES_URL landed in master through #645, closing.

pragmatrix avatar Mar 31 '23 11:03 pragmatrix