@@ -19,6 +19,9 @@ To realize this goal, the Rust and WebAssembly domain working group will:
19
19
* Polish our toolchain and developer workflow, culminating in a 1.0 version of
20
20
` wasm-pack `
21
21
22
+ * Invest in monitoring, testing, and profiling infrastructure to keep our tools
23
+ and libraries snappy, stable and production-ready.
24
+
22
25
# Motivation
23
26
24
27
<!-- Why are we doing this? What use cases does it support? What problems does it -->
@@ -209,6 +212,62 @@ that `wasm-pack` is actually fairly close to being feature complete.
209
212
After we've finished all these tasks, we should publish a 1.0 release of
210
213
` wasm-pack ` .
211
214
215
+ ## Monitoring, Profiling, and Testing Infrastructure
216
+
217
+ > The main objection I've experienced when proposing rust/wasm is compile times,
218
+ > but the end-to-end latency actually looks pretty competitive so far [ ...]
219
+ > Having a couple of benchmarks in CI and a graph online somewhere would go a
220
+ > long way towards keeping it that way.
221
+
222
+ <cite >&mdash ; @jamii in [ an RFC
223
+ comment] ( https://github.com/rustwasm/rfcs/pull/7#issuecomment-458543182 ) </cite >
224
+
225
+ > If I want to run the tests of a library using both libtest and
226
+ > wasm-bindgen-test I need to write:
227
+ >
228
+ > ``` rust
229
+ > #[cfg_attr(not(target_arch = " wasm32" ), test)]
230
+ > #[cfg_attr(target_arch = " wasm32" , wasm_bindgen_test)]
231
+ > fn my_test () { ... }
232
+ > ```
233
+ >
234
+ > instead of just
235
+ >
236
+ > ```rust
237
+ > #[test]`
238
+ > fn my_test () { ... }
239
+ > ```
240
+
241
+ <cite >& mdash ; @ gnzlbg in [an RFC
242
+ comment ](https : // github.com/rustwasm/rfcs/pull/7#issuecomment-460257231)</cite>
243
+
244
+ We should build [perf . rust- lang . org](https : // perf.rust-lang.org)-style
245
+ infrastructure <sup >0 </ sup > to keep an eye on
246
+
247
+ * code size of popular and foundational wasm crates (such as those crates in our
248
+ modular toolkit ), and
249
+
250
+ * our `wasm - bindgen ` and `wasm - pack ` build times .
251
+
252
+ By continually tracking this data over time , and just at once at a particular ,
253
+ we will hold ourselves accountable to delivering on our promises of a
254
+ lightweight toolkit and " stable, production-ready" toolchain .
255
+
256
+ <small ><sup >0 </ sup > Or perhaps integrate our monitoring into perf . rust- lang . org
257
+ if it makes sense and the maintainers are willing . </ small >
258
+
259
+ That is the infrastructure story at the macro - level , but we also need to support
260
+ the needs of crates within the ecosystem at the micro - level . That means
261
+ continuing to invest in unit testing and profiling Rust - generated Wasm
262
+ binaries . Concretely , we should
263
+
264
+ * add benchmarking support to `wasm - bindgen - test `, and
265
+
266
+ * make `wasm - bindgen - test ` future - compatible with the eRFC for custom test
267
+ frameworks , paving the way forward for making regular `#[test]` and `#[bench]`
268
+ Just Work & trade ; with Wasm instead of requiring the use of
269
+ `#[wasm_bindgen_test]` instead.
270
+
212
271
# Rationale , Drawbacks , and Alternatives
213
272
214
273
<! -- This is your chance to discuss your proposal in the context of the whole design - ->
0 commit comments