Skip to content
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

Configurable download url #379

Closed
picoHz opened this issue May 21, 2020 · 2 comments
Closed

Configurable download url #379

picoHz opened this issue May 21, 2020 · 2 comments

Comments

@picoHz
Copy link
Contributor

picoHz commented May 21, 2020

Hello.
I want to use a mirror server for downloading static libraries in build.rs because downloading files from GitHub is extremely slow in my home.

Could you add an option to change download url like this?

--- a/build.rs
+++ b/build.rs
@@ -168,7 +168,8 @@ fn download_ninja_gn_binaries() {
 }

 fn static_lib_url() -> (String, String) {
-  let base = "https://github.com/denoland/rusty_v8/releases/download";
+  let default_base = "https://github.com/denoland/rusty_v8/releases/download";
+  let base = env::var("RUSTY_V8_MIRROR").unwrap_or_else(|_| default_base.into());
   let version = env::var("CARGO_PKG_VERSION").unwrap();
   let target = env::var("TARGET").unwrap();
   if cfg!(target_os = "windows") {
@piscisaureus
Copy link
Member

@picoHz I'm open to adding this feature. Can you send the proposed change in the form of a PR?

@piscisaureus
Copy link
Member

#446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants