Skip to content

Commit

Permalink
Improved contributing docs in web-sys README (#4302)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Dec 6, 2024
1 parent 89f2af8 commit 0a02046
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions crates/web-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Raw bindings to Web APIs for projects using `wasm-bindgen`.

* [The `web-sys` section of the `wasm-bindgen`
- [The `web-sys` section of the `wasm-bindgen`
guide](https://rustwasm.github.io/wasm-bindgen/web-sys/index.html)
* [API Documentation](https://rustwasm.github.io/wasm-bindgen/api/web_sys/)
- [API Documentation](https://rustwasm.github.io/wasm-bindgen/api/web_sys/)

## Crate features

Expand All @@ -30,19 +30,23 @@ If you don't see a particular web API in `web-sys`, here is how to add it.
[very bottom](https://w3c.github.io/mediasession/#idl-index) of _that_ page
is the IDL.
2. Annotate the functions that can throw with `[Throws]`
3. Run `cargo run --release --package wasm-bindgen-webidl -- webidls src/features ./Cargo.toml`
4. Run `git add .` to add all the generated files into git.
5. Add an entry in CHANGELOG.md like the following
3. `cd crates/web-sys`
4. Run `cargo run --release --package wasm-bindgen-webidl -- webidls src/features ./Cargo.toml`

If formatting fails, you can run `cargo fmt` in the `crates/web-sys` directory. On Windows, you might also want to run `cargo fmt -- --config newline_style=Unix` depending on your git configuration.

5. Run `git add .` to add all the generated files into git.
6. Add an entry in CHANGELOG.md like the following

```md
...

## Unreleased

### Added

...

* Added <your addition>
[#1234](https://github.com/rustwasm/wasm-bindgen/pull/1234) # <- link to your PR
[#1234](https://github.com/rustwasm/wasm-bindgen/pull/1234) # <- link to your PR
```

0 comments on commit 0a02046

Please sign in to comment.