From 752ad99cbd8a4d23756c4f03e9dfd3644eee620b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 24 Sep 2018 10:51:05 -0700 Subject: [PATCH] Update contributing docs for js-sys Tweak a few links here and there and otherwise mention that we should be complete and stage 4 proposals can be added in the future Closes #859 --- .../contributing/js-sys/adding-more-apis.md | 22 +++++++++++++------ guide/src/contributing/js-sys/index.md | 9 ++------ guide/src/contributing/js-sys/testing.md | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/guide/src/contributing/js-sys/adding-more-apis.md b/guide/src/contributing/js-sys/adding-more-apis.md index 1270165b1..ee2c52245 100644 --- a/guide/src/contributing/js-sys/adding-more-apis.md +++ b/guide/src/contributing/js-sys/adding-more-apis.md @@ -1,11 +1,18 @@ # Adding Support for More JavaScript Global APIs -We've got a [GitHub issue][issue] tracking the remaining APIs that still need to -be added to the `js-sys` crate, and we'd love your help adding them! The steps -to follow are: +As of 2018-09-24 we've [added all APIs][issue] in the current ECMAScript +standard (yay!). To that end you'll hopefully not find a missing API, but if you +do please feel free to file an issue! -* [ ] Comment on the issue saying which thing you are going to make bindings for - (so that we don't accidentally duplicate effort). +We currently add new APIs added to ECMAScript that are in [TC39 stage 4][tc39] +to this crate. If there's a new API in stage 4, feel free to file an issue as +well! + +### Instructions for adding an API + +* [ ] Find the `wasm-bindgen` issue for the API you'd like to add. If this + doesn't exist, feel free to open one! Afterwards be sure to comment on the + issue to avoid duplication of work. * [ ] Open the [MDN page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects) @@ -19,9 +26,10 @@ to follow are: * [ ] Add a test for the new binding to `crates/js-sys/tests/wasm/MyType.rs` -* [ ] Run the JS global API bindings tests with `cargo test -p js-sys --target - wasm32-unknown-unknown` +* [ ] Run the [JS global API bindings tests][test] * [ ] Send a pull request! [issue]: https://github.com/rustwasm/wasm-bindgen/issues/275 +[tc39]: https://tc39.github.io/process-document/ +[test]: testing.html diff --git a/guide/src/contributing/js-sys/index.md b/guide/src/contributing/js-sys/index.md index 57f0b217d..497081f68 100644 --- a/guide/src/contributing/js-sys/index.md +++ b/guide/src/contributing/js-sys/index.md @@ -32,12 +32,8 @@ pub fn timed(callback: &js_sys::Function) -> f64 { } ``` -The `js-sys` crate isn't quite 100% feature complete yet. There are still some -JavaScript types and methods that we don't have bindings for. If you'd like to -help out check out [the contribution documentation][contrib]. - -Also, as mentioned above, the `js-sys` crate doesn't contain bindings to any Web -APIs like [`document.querySelectorAll`][mdn-qsa]. These will be part of the +The `js-sys` crate doesn't contain bindings to any Web APIs like +[`document.querySelectorAll`][mdn-qsa]. These will be part of the [`web-sys`](./web-sys.html) crate. [MDN]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects @@ -48,4 +44,3 @@ APIs like [`document.querySelectorAll`][mdn-qsa]. These will be part of the [web-sys-contributing]: https://rustwasm.github.io/wasm-bindgen/web-sys.html [web-sys-issues]: https://github.com/rustwasm/wasm-bindgen/issues?q=is%3Aissue+is%3Aopen+label%3Aweb-sys [mdn-date-now]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now -[contrib]: https://github.com/rustwasm/wasm-bindgen/issues/275 diff --git a/guide/src/contributing/js-sys/testing.md b/guide/src/contributing/js-sys/testing.md index fed1220f9..54d9ff744 100644 --- a/guide/src/contributing/js-sys/testing.md +++ b/guide/src/contributing/js-sys/testing.md @@ -10,4 +10,4 @@ cargo test --target wasm32-unknown-unknown ``` These tests are largely executed in Node.js right now via the -`wasm-bindgen-test` framework. More documentation on the framework coming soon! +[`wasm-bindgen-test` framework](../../wasm-bindgen-test/index.html)