0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-21 15:04:33 -05:00

Use env var V8_BINARY instead of cargo feature

This commit is contained in:
Ryan Dahl 2020-03-17 20:19:53 -04:00
parent 323f5ee3e7
commit e13567d89f
3 changed files with 5 additions and 9 deletions

View file

@ -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"

View file

@ -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

View file

@ -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()