Skip to content

Commit 0fecfba

Browse files
committed
chore: bump runtime to v0.11.2 and add snapshot support
- Update openworkers-core to v0.11.0 - Update openworkers-runtime-v8 to v0.11.2 with ptrcomp feature - Add snapshot binary for V8 snapshot generation - Update Dockerfile and Dockerfile.multi to generate and include snapshot - Update README with snapshot instructions and full API list
1 parent aed8945 commit 0fecfba

6 files changed

Lines changed: 146 additions & 62 deletions

File tree

Cargo.lock

Lines changed: 55 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openworkers-task-executor"
3-
version = "0.1.0"
3+
version = "0.11.0"
44
edition = "2024"
55
license = "MIT"
66
description = "Minimal task executor for OpenWorkers - fetch only, no database"
@@ -12,10 +12,10 @@ database = ["dep:sqlx", "dep:dotenvy"]
1212

1313
[dependencies]
1414
# Core types
15-
openworkers-core = { git = "https://github.com/openworkers/openworkers-core", tag = "v0.9.0" }
15+
openworkers-core = { git = "https://github.com/openworkers/openworkers-core", tag = "v0.11.0" }
1616

1717
# Runtime backend (V8) - required
18-
openworkers-runtime-v8 = { git = "https://github.com/openworkers/openworkers-runtime-v8", tag = "v0.9.1" }
18+
openworkers-runtime-v8 = { git = "https://github.com/openworkers/openworkers-runtime-v8", tag = "v0.11.2", features = ["ptrcomp"] }
1919

2020
# Async runtime
2121
tokio = { version = "1.49.0", features = ["full"] }
@@ -53,3 +53,7 @@ tempfile = "3.19"
5353
[[bin]]
5454
name = "task-executor"
5555
path = "src/main.rs"
56+
57+
[[bin]]
58+
name = "snapshot"
59+
path = "bin/snapshot.rs"

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ RUN --mount=type=cache,target=$CARGO_HOME/git \
2323

2424
COPY . .
2525

26+
RUN touch $RUNTIME_SNAPSHOT_PATH
27+
2628
RUN --mount=type=cache,target=$CARGO_HOME/git \
2729
--mount=type=cache,target=$CARGO_HOME/registry \
2830
--mount=type=cache,target=/build/target \
31+
cargo run --release --features=$FEATURES --bin snapshot && \
2932
cargo build --release --features=$FEATURES && \
3033
cp /build/target/release/task-executor /build/output
3134

@@ -36,5 +39,6 @@ RUN apt-get update \
3639
&& rm -rf /var/lib/apt/lists/*
3740

3841
COPY --from=builder /build/output /usr/local/bin/task-executor
42+
COPY --from=builder /build/snapshot.bin /build/snapshot.bin
3943

4044
ENTRYPOINT ["/usr/local/bin/task-executor"]

0 commit comments

Comments
 (0)