mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
ba232544e7
The nativets in-process runtime (deno_core) exposed no Web Crypto API:
`crypto` was undefined, so scripts could not use `crypto.getRandomValues`,
`crypto.randomUUID`, or `crypto.subtle`, even though the bun runner provides
them. This closes that parity gap by registering the `deno_crypto` extension
and wiring the crypto globals onto `globalThis`.
- Pin `deno_crypto = "0.223.0"`, the sibling release of the already-pinned
deno_core 0.352 / deno_web 0.240 stack (deps: deno_core ^0.352,
deno_web ^0.240, deno_error =0.6.1), so the rest of the deno stack is
untouched.
- Register `deno_crypto::init(None)` after `deno_web` in both the snapshot
(build.rs) and the runtime (lib.rs) extension lists, keeping the snapshot a
prefix of the runtime list. deno_crypto declares deps = [deno_webidl,
deno_web], which the position satisfies.
- Import `ext:deno_crypto/00_crypto.js` in runtime.js and assign
`crypto` / `Crypto` / `CryptoKey` / `SubtleCrypto` to `globalThis`.
- Add the `smoke_web_crypto` opt-in smoke test asserting the UUIDv4 shape of
`randomUUID`, a non-zero `getRandomValues` fill, and the known
SHA-256("abc") vector via `subtle.digest`.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
72 lines
1.7 KiB
TOML
72 lines
1.7 KiB
TOML
[package]
|
|
name = "windmill-runtime-nativets"
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
|
|
[lib]
|
|
name = "windmill_runtime_nativets"
|
|
path = "src/lib.rs"
|
|
|
|
[features]
|
|
default = []
|
|
private = []
|
|
enterprise = ["windmill-common/enterprise"]
|
|
|
|
[dependencies]
|
|
windmill-common = { workspace = true, default-features = false }
|
|
windmill-queue.workspace = true
|
|
windmill-parser-ts.workspace = true
|
|
deno_fetch.workspace = true
|
|
deno_webidl.workspace = true
|
|
deno_web.workspace = true
|
|
deno_crypto.workspace = true
|
|
deno_net.workspace = true
|
|
deno_console.workspace = true
|
|
deno_url.workspace = true
|
|
deno_core.workspace = true
|
|
deno_ast.workspace = true
|
|
deno_tls.workspace = true
|
|
deno_permissions.workspace = true
|
|
deno_io.workspace = true
|
|
deno_fs.workspace = true
|
|
deno_telemetry.workspace = true
|
|
deno_error.workspace = true
|
|
winapi.workspace = true
|
|
|
|
itertools.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
tokio.workspace = true
|
|
tracing.workspace = true
|
|
anyhow.workspace = true
|
|
uuid.workspace = true
|
|
reqwest.workspace = true
|
|
regex.workspace = true
|
|
lazy_static.workspace = true
|
|
const_format.workspace = true
|
|
futures.workspace = true
|
|
sqlx.workspace = true
|
|
rustls.workspace = true
|
|
|
|
[dev-dependencies]
|
|
rcgen = "0.13.2"
|
|
|
|
[build-dependencies]
|
|
deno_fetch.workspace = true
|
|
deno_webidl.workspace = true
|
|
deno_web.workspace = true
|
|
deno_crypto.workspace = true
|
|
deno_net.workspace = true
|
|
deno_console.workspace = true
|
|
deno_url.workspace = true
|
|
deno_core.workspace = true
|
|
deno_ast.workspace = true
|
|
deno_tls.workspace = true
|
|
deno_permissions.workspace = true
|
|
deno_io.workspace = true
|
|
deno_fs.workspace = true
|
|
deno_telemetry.workspace = true
|
|
deno_error.workspace = true
|
|
winapi.workspace = true
|