|
1 | 1 | [](https://github.com/webmachinelearning/webnn/actions)
|
2 | 2 |
|
| 3 | + |
| 4 | + |
3 | 5 | # Web Neural Network API
|
4 | 6 |
|
5 | 7 | This repository hosts the [Web Neural Network API](https://www.w3.org/TR/webnn/)
|
6 | 8 | being worked on in the
|
7 | 9 | [Web Machine Learning Working Group](https://www.w3.org/groups/wg/webmachinelearning).
|
8 | 10 |
|
9 |
| -## Pull requests |
| 11 | +To join this Working Group, please see these [instructions](https://webmachinelearning.github.io/community/#join). |
10 | 12 |
|
11 |
| -To propose a change, update `index.bs` and submit your PR. The `index.html` file is automatically built and deployed upon merge. |
| 13 | +## Development |
12 | 14 |
|
13 |
| -The spec is written using [Bikeshed](https://tabatkins.github.io/bikeshed). Please refer to the [Bikeshed Documentation](https://tabatkins.github.io/bikeshed/) for the Bikeshed syntax. |
| 15 | +This section describes the process for building this specification on your local computer for development and testing purposes. You may want to do this before you submit a [Pull Request](#pull-requests) to catch possible build issues early. |
14 | 16 |
|
15 |
| -For testing purposes, you can generate the spec locally: |
| 17 | +The first step is to clone the repo: |
16 | 18 |
|
17 |
| -If you have bikeshed [installed locally](https://tabatkins.github.io/bikeshed/#installing), you can generate the specification locally with: |
| 19 | +``` |
| 20 | +prompt> git clone https://github.com/webmachinelearning/webnn |
| 21 | +``` |
| 22 | + |
| 23 | +Next, install the makefile dependencies: |
18 | 24 |
|
19 | 25 | ```
|
20 |
| -prompt> make |
| 26 | +prompt> cd tools |
| 27 | +prompt> npm install |
| 28 | +prompt> cd .. |
21 | 29 | ```
|
22 | 30 |
|
23 |
| -This simply runs bikeshed on the `index.bs` file. |
| 31 | +Now you can choose between the two options: |
| 32 | + |
| 33 | +- [Install Bikeshed locally](https://speced.github.io/bikeshed/#install-final) (works offline, faster build) and run: |
| 34 | + |
| 35 | +``` |
| 36 | +prompt> make |
| 37 | +``` |
24 | 38 |
|
25 |
| -Otherwise, you can use the [bikeshed Web API](https://tabatkins.github.io/bikeshed/#remote): |
| 39 | +- Or use the [Bikeshed HTTP API](https://speced.github.io/bikeshed/#remote) (requires internet, slower build): |
26 | 40 |
|
27 | 41 | ```
|
28 | 42 | prompt> make online=1
|
29 | 43 | ```
|
| 44 | + |
| 45 | +In both the cases, the makefile runs [tools](tools) to check the source formatting and catch common errors, and then uses Bikeshed to convert the `index.bs` source file to an `index.html` output file. |
| 46 | + |
| 47 | +If the build is clean you can open the `index.html` file in your browser to view it in all its glory! If you're happy with what you see, congratulations! You can proceed to submit a [Pull Request](#pull-requests). |
| 48 | + |
| 49 | +## Pull Requests |
| 50 | + |
| 51 | +First, please read the [contributing guidelines](CONTRIBUTING.md). |
| 52 | + |
| 53 | +The spec is written using [Bikeshed](https://speced.github.io/bikeshed/) spec-generating tool. Please refer to the [Bikeshed Documentation](https://speced.github.io/bikeshed/) for the Bikeshed syntax and [coding conventions](docs/SpecCodingConventions.md) specific to this specification. |
| 54 | + |
| 55 | +To propose a change to the specification, you are only required to update the `index.bs` source file authored in Bikeshed syntax. |
| 56 | + |
| 57 | +Before you submit a PR, it is recommended to test your changes locally (see [Development](#development)). If your local build is clean, you can proceed to submit the PR. If you want to submit a WIP PR that still contains errors or is incomplete, please [convert the PR to a draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft). As a convention, please [link the PR to an existing issue](https://graphite.dev/guides/how-to-link-pull-requests-to-github-issues) for [non-editorial changes](CONTRIBUTING.md#type-of-change). |
| 58 | + |
| 59 | +After you submit the PR, it is first automatically checked with [GitHub Actions CI/CD](.github/workflows/auto-publish.yml) for common issues and then reviewed by group participants. After adequate review and approvals, the PR is merged and a new version of the specification is deployed at https://www.w3.org/TR/webnn/ ([history](https://www.w3.org/standards/history/webnn/)). |
0 commit comments