diff --git a/Cargo.toml b/Cargo.toml index 7b1004d6..7437773b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,11 +47,6 @@ exclude = [ "!v8/tools/testrunner/utils/dump_build_config.py", ] -[features] -# Enable this feature to download and prebuilt V8 binaries from -# https://github.com/denoland/rusty_v8/releases -binary = [] - [dependencies] lazy_static = "1.4.0" libc = "0.2.67" diff --git a/README.md b/README.md index b33f5290..981a04e7 100644 --- a/README.md +++ b/README.md @@ -62,13 +62,14 @@ V8 is very large and take a long time to compile. Many users may prefer to use a prebuilt version of V8. We publish static libs for every version of rusty v8 on [Github](https://github.com/denoland/rusty_v8/releases). -To use these prebuilt binaries use the `binary` feature: +To use these prebuilt binaries use the `V8_BINARY=1` environmental variable: ``` -cargo build --features="binary" +V8_BINARY=1 cargo build ``` -This will cause rusty v8 to download the binaries during the build process. +This will cause rusty v8 to download the static lib binary during the build +process. ## FAQ diff --git a/build.rs b/build.rs index 91016d0b..e481e5b2 100644 --- a/build.rs +++ b/build.rs @@ -23,7 +23,7 @@ fn main() { .map(|s| s.starts_with("rls")) .unwrap_or(false); - if cfg!(feature = "binary") { + if env::var_os("V8_BINARY").is_some() { download_static_lib_binaries(); } else if !(is_trybuild || is_cargo_doc | is_rls) { build_v8()