-
Notifications
You must be signed in to change notification settings - Fork 400
Expand file tree
/
Copy pathchompfile.toml
More file actions
97 lines (83 loc) · 2.49 KB
/
chompfile.toml
File metadata and controls
97 lines (83 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version = 0.1
[[task]]
name = 'build:types'
deps = ['install:ts-gen']
# `Env` / `ExecutionContext` are project-specific re-exports that ts-gen
# can't infer; everything else (`ReadableStream`, `Headers`, `Event`, …)
# resolves through ts-gen's built-in web_sys defaults.
run = '''ts-gen --input types/email.d.ts --output worker/src/email.rs \
--external "Env=crate::Env" \
--external "ExecutionContext=crate::Context"'''
[[task]]
name = 'install:ts-gen'
# ts-gen pulls in oxc which needs a newer rustc than the workspace's pinned 1.88;
# build with the user's stable toolchain instead so it ignores rust-toolchain.toml.
run = 'cargo +stable install --path ts-gen'
[[task]]
name = 'build:wasm-bindgen'
cwd = 'wasm-bindgen'
run = 'cargo build -p wasm-bindgen-cli --bin wasm-bindgen'
[[task]]
name = 'build:wasm-bindgen-test-runner'
cwd = 'wasm-bindgen'
run = 'cargo build -p wasm-bindgen-cli --bin wasm-bindgen-test-runner'
[[task]]
name = 'build:worker-build'
run = 'cargo build -p worker-build'
[[task]]
name = 'build'
serial = true
deps = ['build:wasm-bindgen', 'build:worker-build']
[[task]]
name = 'lint'
run = 'cargo clippy --features d1,queue --all-targets --workspace -- -D warnings'
[[task]]
name = 'fmt'
run = 'cargo fmt'
[[task]]
name = 'lint:fix'
dep = 'fmt'
run = 'cargo clippy --features d1,queue --all-targets --workspace --fix -- -D warnings'
[[task]]
name = 'test:unit'
serial = true
deps = ['build', 'build:wasm-bindgen-test-runner']
env.CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER = 'wasm-bindgen/target/debug/wasm-bindgen-test-runner'
run = 'cargo test -p worker --target wasm32-unknown-unknown'
[[task]]
name = 'test'
deps = ['build']
cwd = 'test'
env.NO_MINIFY = '1'
env.WASM_BINDGEN_BIN = '../wasm-bindgen/target/debug/wasm-bindgen'
env.WORKERD_ALL_AUTOGATES = '1'
run = '''
../target/debug/worker-build --dev
npx vitest run --testTimeout 25000
'''
[[task]]
name = 'test-http'
deps = ['build']
cwd = 'test'
env.NO_MINIFY = '1'
env.WASM_BINDGEN_BIN = '../wasm-bindgen/target/debug/wasm-bindgen'
env.WORKERD_ALL_AUTOGATES = '1'
run = '''
../target/debug/worker-build --release --features http
npx vitest run --testTimeout 25000
'''
[[task]]
name = 'test-panic-unwind'
deps = ['build']
cwd = 'test'
env.NO_MINIFY = '1'
env.WASM_BINDGEN_BIN = '../wasm-bindgen/target/debug/wasm-bindgen'
env.WORKERD_ALL_AUTOGATES = '1'
run = '''
../target/debug/worker-build --dev --panic-unwind
npx vitest run --testTimeout 25000
'''
[[task]]
name = 'test-mem'
cwd = 'test'
run = 'npx wrangler dev --enable-containers=false'