Skip to content

Commit dca77cf

Browse files
committed
Merge branch 'main' into crdtp
2 parents 2068969 + f1f38ba commit dca77cf

40 files changed

+1165
-236
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ jobs:
143143
uses: cargo-bins/cargo-binstall@main
144144

145145
- name: Install nextest
146-
run: cargo binstall cargo-nextest --secure
146+
run: cargo binstall cargo-nextest --secure --locked --no-confirm
147+
env:
148+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147149

148150
- name: Install python
149151
uses: actions/setup-python@v5
@@ -291,7 +293,7 @@ jobs:
291293
uses: cargo-bins/cargo-binstall@main
292294

293295
- name: Install nextest
294-
run: cargo binstall cargo-nextest --secure
296+
run: cargo binstall cargo-nextest --secure --locked
295297

296298
- name: Install python
297299
uses: actions/setup-python@v5

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "v8"
3-
version = "145.0.0"
3+
version = "146.3.0"
44
description = "Rust bindings to V8"
55
readme = "README.md"
66
authors = ["the Deno authors"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Rusty V8 Binding
22

3-
V8 Version: 14.5.201.4
3+
V8 Version: 14.6.202.9
44

55
[![ci](https://github.com/denoland/rusty_v8/workflows/ci/badge.svg?branch=main)](https://github.com/denoland/rusty_v8/actions)
66
[![crates](https://img.shields.io/crates/v/v8.svg)](https://crates.io/crates/v8)

build

Submodule build updated 79 files

build.rs

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,14 @@ fn build_binding() {
222222
.generate_cstr(true)
223223
.rustified_enum(".*UseCounterFeature")
224224
.rustified_enum(".*ModuleImportPhase")
225+
.rustified_enum(".*Intercepted")
225226
.bitfield_enum(".*GCType")
226227
.bitfield_enum(".*GCCallbackFlags")
227228
.allowlist_item("v8__.*")
228229
.allowlist_item("cppgc__.*")
229230
.allowlist_item("RustObj")
230231
.allowlist_item("memory_span_t")
232+
.allowlist_item("const_memory_span_t")
231233
.allowlist_item("ExternalConstOneByteStringResource")
232234
.generate()
233235
.expect("Unable to generate bindings");
@@ -636,32 +638,60 @@ fn download_file(url: &str, filename: &Path) {
636638
fs::remove_file(&tmpfile).unwrap();
637639
}
638640

639-
// Try downloading with python first. Python is a V8 build dependency,
641+
// Try downloading with deno first, then python, then curl.
642+
println!("Downloading {url}");
643+
let status = which("deno").ok().and_then(|deno| {
644+
println!("Trying with Deno...");
645+
Command::new(deno)
646+
.arg("eval")
647+
.arg(
648+
"const [url, path] = Deno.args; \
649+
const resp = await fetch(url); \
650+
if (!resp.ok) Deno.exit(1); \
651+
const file = await Deno.open(path, { write: true, create: true }); \
652+
await resp.body.pipeTo(file.writable);",
653+
)
654+
.arg("--allow-net")
655+
.arg("--allow-write")
656+
.arg("--")
657+
.arg(url)
658+
.arg(&tmpfile)
659+
.status()
660+
.ok()
661+
.filter(|s| s.success())
662+
});
663+
664+
// Try downloading with python. Python is a V8 build dependency,
640665
// so this saves us from adding a Rust HTTP client dependency.
641-
println!("Downloading (using Python) {url}");
642-
let status = Command::new(python())
643-
.arg("./tools/download_file.py")
644-
.arg("--url")
645-
.arg(url)
646-
.arg("--filename")
647-
.arg(&tmpfile)
648-
.status();
649-
650-
// Python is only a required dependency for `V8_FROM_SOURCE` builds.
651-
// If python is not available, try falling back to curl.
652666
let status = match status {
653-
Ok(status) if status.success() => status,
667+
Some(status) => status,
654668
_ => {
655-
println!("Python downloader failed, trying with curl.");
656-
Command::new("curl")
657-
.arg("-L")
658-
.arg("-f")
659-
.arg("-s")
660-
.arg("-o")
661-
.arg(&tmpfile)
669+
println!("Trying with Python...");
670+
let python_status = Command::new(python())
671+
.arg("./tools/download_file.py")
672+
.arg("--url")
662673
.arg(url)
663-
.status()
664-
.unwrap()
674+
.arg("--filename")
675+
.arg(&tmpfile)
676+
.status();
677+
678+
// Python is only a required dependency for `V8_FROM_SOURCE` builds.
679+
// If python is not available, try falling back to curl.
680+
match python_status {
681+
Ok(status) if status.success() => status,
682+
_ => {
683+
println!("Python downloader failed, trying with curl.");
684+
Command::new("curl")
685+
.arg("-L")
686+
.arg("-f")
687+
.arg("-s")
688+
.arg("-o")
689+
.arg(&tmpfile)
690+
.arg(url)
691+
.status()
692+
.unwrap()
693+
}
694+
}
665695
}
666696
};
667697

buildtools

Submodule buildtools updated from 4dc32b3 to 6a18683

examples/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ impl<'scope, 'obj, 'isolate> JsHttpRequestProcessor<'scope, 'obj, 'isolate> {
295295
args: v8::PropertyCallbackArguments,
296296
mut rv: v8::ReturnValue,
297297
) {
298-
let this = args.this();
299-
let external = Self::unwrap_request(scope, this);
298+
let holder = args.holder();
299+
let external = Self::unwrap_request(scope, holder);
300300

301301
assert!(
302302
!external.is_null(),

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "1.89.0"
2+
channel = "1.91.0"
33
components = ["rustfmt", "clippy"]
44
targets = [
55
"x86_64-apple-darwin",

0 commit comments

Comments
 (0)