WebAssembly / WebAssembly/WASI

Recapitulate type aliases in documentation

Open
#686 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-clocks S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

The 0.3.0 draft of monotonic-clock adds a new wait-for API which takes a duration:

https://github.com/WebAssembly/wasi-clocks/blob/646092fb6428b2ecf1b97452a71a44ec3f2fd3ce/wit-0.3.0-draft/monotonic-clock.wit#L42-L44

Unfortunately the Rust bindings (and I'm sure they're not alone) don't surface the duration alias, making the documentation cryptic:

image

When using primitive type aliases, therefore, it would be useful to recapitulate their interpretation at the point of use.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to monotonic-clock.wit in the 0.3.0 draft and to the Rust bindings; read the linked wait-for definition first, then trace where primitive aliases are rendered in binding documentation. Done means the duration alias is recapitulated at its point of use and the resulting documentation is no longer cryptic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.