Skip to content

Commit f426533

Browse files
committed
Add "Monitoring, Profiling, and Testing Infrastructure"
1 parent 063c4ce commit f426533

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

text/007-2019-roadmap.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ To realize this goal, the Rust and WebAssembly domain working group will:
1919
* Polish our toolchain and developer workflow, culminating in a 1.0 version of
2020
`wasm-pack`
2121

22+
* Invest in monitoring, testing, and profiling infrastructure to keep our tools
23+
and libraries snappy, stable and production-ready.
24+
2225
# Motivation
2326

2427
<!-- 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.
209212
After we've finished all these tasks, we should publish a 1.0 release of
210213
`wasm-pack`.
211214

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+
212271
# Rationale, Drawbacks, and Alternatives
213272
214273
<!-- This is your chance to discuss your proposal in the context of the whole design -->

0 commit comments

Comments
 (0)