Skip to content

Commit

Permalink
Review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
LegNeato committed Jul 13, 2024
1 parent 8298415 commit 6636a46
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @eddyb
* @eddyb @LegNeato @fornwall
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ labels: "t: enhancement"
---

<!--
Thank you for your interest in the `rust-gpu` project! This template is for
proposing a minor improvement, such as addig a new method, or improving
documentation. Please try to provide a short high level overview of what you would
Thank you for your interest in the `rust-gpu` project!
Please try to provide a short high level overview of what you would
like you to add. Also be sure to check the existing and `wontfix` issues to see
if it's already been proposed before posting.
Expand Down
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/mcp.md

This file was deleted.

44 changes: 22 additions & 22 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand All @@ -22,17 +22,17 @@ community include:
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

Expand All @@ -52,7 +52,7 @@ decisions when appropriate.

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

Expand Down Expand Up @@ -81,15 +81,15 @@ behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.
**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

Expand All @@ -105,27 +105,27 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.
**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
46 changes: 0 additions & 46 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,54 +33,8 @@ If you're ready to contribute, start by looking at our open issues tagged as [`h

You can comment on the issue to let others know you're interested in working on it or to ask questions.

### Major Change Process

Most bug fixes can be implemented directly by opening a PR, however for larger design decisions and major changes to the compiler's architecture, this repository uses a two stage "Major Change Proposal" and "Request For Comments" process. If you're unsure about what's required for a specific change you should always start with [**opening an issue**][open-issue].

[open-issue]: https://github.com/rust-gpu/rust-gpu/issues/new

#### Definitions

##### **Major Change Proposal (MCP)**

A proposal to make a significant internal changes or small public facing changes to the compiler. An MCP is opened as an issue on `rust-gpu` the repository. An MCP typically only requires one member's approval. Though if the change is significantly big enough it may require the full team's sign off or require an RFC.

An MCP should generally be a short (1-2 paragraphs) high level overview of the change you would want to make, the motivation behind the change, and potential solutions. There is a [major change issue template][mcp-template] you can use for convenience.

[mcp-template]: https://github.com/rust-lang/rust/issues/new?labels=mcp%3A%20proposed&template=mcp.md

Examples of what would require an MCP:

- Changing the compiler architecture.
- Adding support for an existing Rust language or feature.
- Small additions (e.g. new methods) to `spirv-std` types.
- Proposing an RFC.

Examples of what would **not** require an MCP:

- Updating documentation
- Fixing existing bugs
- Performance improvements

##### **Request For Comments (RFC)**

A proposal to make significant public facing changes to the compiler or standard library. RFCs are opened as pull requests to the `rust-gpu` repository. RFCs require full sign off by the team, before being approved or implemented. Check out the [RFC `000-template.md` document][rfc-template] for details on the structure.

[rfc-template]: https://github.com/rust-gpu/rust-gpu/blob/main/rfcs/000-template.md

Examples of what would require an RFC:

- Major additions to `spirv-std`, such as new APIs, or breaking changes to existing ones.

#### Life-cycle

1. You file a [major change proposal][mcp-template] outlining the changes and the motivation for it.
2. A member of the team will review the proposal and tag it with the appropriate label.
2.1. `mcp: accepted` means that the MCP has been accepted and is ready for a pull request implementing it.
2.2. `mcp: rfc needed` means that the MCP has been accepted as something the team would like but needs a full RFC before the implementation.
2.3 Closing an issue means that the MCP has rejected.
3. If the proposal has been accepted then the implementation can begin.

### Pull Request Process

1. Fork the repository.
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ members = [
"examples/shaders/compute-shader",
"examples/shaders/mouse-shader",
"examples/multibuilder",

"crates/rustc_codegen_spirv",
"crates/rustc_codegen_spirv-types",
"crates/spirv-builder",
"crates/spirv-std",
"crates/spirv-std/shared",
"crates/spirv-std/macros",

"tests",
"tests/deps-helper",
]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**Rust as a first-class language and ecosystem for GPU graphics & compute shaders**

[![Build status](https://github.com/rust-gpu/rust-gpu/actions/workflows/ci.yaml/badge.svg)](https://github.com/rust-gpu/rust-gpu/actions/workflows/ci.yaml)
[![Documentation](https://img.shields.io/badge/docs-API-blue)](https://rust-gpu.github.io/rust-gpu/api/rustc_codegen_spirv)

</div>

Expand Down Expand Up @@ -92,7 +93,6 @@ The scope of this overall project is quite broad, but is in multiple stages
- This is the same mechanism that [rustc_codegen_cranelift](https://github.com/bjorn3/rustc_codegen_cranelift) and [rustc_codegen_gcc](https://github.com/antoyo/rustc_codegen_gcc) use.
- Currently only [SPIR-V] support is planned, [Vulkan](<https://en.wikipedia.org/wiki/Vulkan_(API)>)'s open compiler target
- Possible a future version could support [DXIL](https://github.com/microsoft/DirectXShaderCompiler/blob/master/docs/DXIL.rst) (the target for DirectX) or [WGSL](https://github.com/gpuweb/gpuweb/tree/main/wgsl) (the WebGPU shading language that's bijective with SPIR-V)
- Focus on Vulkan compute shaders first, then after Vulkan graphics shaders
- [Cargo](https://github.com/rust-lang/cargo/) and [crates.io](https://crates.io) support to develop and publish SPIR-V crates

## Process
Expand Down
4 changes: 2 additions & 2 deletions crates/spirv-std/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Check out [The `rust-gpu` Dev Guide][gpu-guide] for information on how to get st

Experiment with rust-gpu shaders in-browser at [SHADERed][shadered].

[migration]: https://github.com/EmbarkStudios/rust-gpu/blob/097ba40bedd74eeaa296e719ef7e41f2d3d76c23/docs/src/migration-to-register-tool.md
[source]: https://github.com/EmbarkStudios/rust-gpu/blob/69cb69d28f1e64420ee31ade5e7dffb7c5621e89/examples/shaders/sky-shader/src/lib.rs
[migration]: https://github.com/rust-gpu/rust-gpu/blob/097ba40bedd74eeaa296e719ef7e41f2d3d76c23/docs/src/migration-to-register-tool.md
[source]: https://github.com/rust-gpu/rust-gpu/blob/69cb69d28f1e64420ee31ade5e7dffb7c5621e89/examples/shaders/sky-shader/src/lib.rs
[gpu-guide]: https://rust-gpu.github.io/rust-gpu/book/
[shadered]: https://shadered.org/shaders?language=rust&sort=hot
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ license-files = [

# This section is considered when running `cargo deny check sources`.
# More documentation about the 'sources' section can be found here:
# https://rust-gpu.github.io/cargo-deny/checks/sources/cfg.html
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
[sources]
# Lint level for what to happen when a crate from a crate registry that is not
# in the allow list is encountered
Expand Down
14 changes: 7 additions & 7 deletions docs/src/building-rust-gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
1. Clone the repository.

```shell
git clone --recurse-submodules https://github.com/EmbarkStudios/rust-gpu
git clone --recurse-submodules https://github.com/rust-gpu/rust-gpu
```

1. **optional** Install [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools#downloads) and add it to your `PATH`. You can skip this step if you just want to run examples with the defaults. See [Using installed SPIRV-Tools](#using-installed-spirv-tools) if you decide to go with this option.
Expand Down Expand Up @@ -40,9 +40,9 @@ cargo run \
You should see `warning: use-installed-tools feature on, skipping compilation of C++ code` during the compilation, but otherwise the build will function just the same as if you compiled the C++ code, with the exception that it will fail if you don't have SPIRV-Tools installed correctly.

[spirv-builder]: https://rust-gpu.github.io/rust-gpu/api/spirv_builder/index.html
[examples]: https://github.com/EmbarkStudios/rust-gpu/tree/main/examples
[examples/runners]: https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/runners
[examples/runners/ash]: https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/runners/ash
[examples/runners/cpu]: https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/runners/cpu
[examples/runners/wgpu]: https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/runners/wgpu
[examples/shaders]: https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/shaders
[examples]: https://github.com/rust-gpu/rust-gpu/tree/main/examples
[examples/runners]: https://github.com/rust-gpu/rust-gpu/tree/main/examples/runners
[examples/runners/ash]: https://github.com/rust-gpu/rust-gpu/tree/main/examples/runners/ash
[examples/runners/cpu]: https://github.com/rust-gpu/rust-gpu/tree/main/examples/runners/cpu
[examples/runners/wgpu]: https://github.com/rust-gpu/rust-gpu/tree/main/examples/runners/wgpu
[examples/shaders]: https://github.com/rust-gpu/rust-gpu/tree/main/examples/shaders
7 changes: 4 additions & 3 deletions docs/src/publishing-rust-gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This is a task list for the maintainers of rust-gpu to remember to do when publi
of rust-gpu (probably not useful for contributors without access to our crates.io account 😋)

The published crates and their relative locations are:

1. `spirv-std-types` (`crates/spirv-std/shared`)
2. `spirv-std-macros` (`crates/spirv-std/macros`)
3. `spirv-std` (`crates/spirv-std`)
Expand All @@ -16,15 +17,15 @@ These are the steps:

1. Bump all the versions to the next one in the workspace's `Cargo.toml`. This project uses workspace
inheritance, so this is the only place you'll find these actual versions. Make sure to pin the
rust-gpu dependencies to their *exact* versions using the `=`-notation, such as: `=0.4.0`. All crates
rust-gpu dependencies to their _exact_ versions using the `=`-notation, such as: `=0.4.0`. All crates
are built and published in tandem so you're not expected to be able to mix and match between versions.
2. Add this new version to the table in `crates/spirv-builder/README.md` and make sure the correct
nightly version is listed there as well.
3. Create a PR with that change. Wait for CI and a review, and merge it.
4. Pull the merged `main` branch.
5. Tag `main` with the version: `git tag v0.4.0`
6. Push the tag: `git push origin v0.4.0`
7. Publish the crates: `cd [crate] && cargo publish` in the order of the list above (make sure
`.cargo/credentials` is set to the project's token). The crates.io index might take some seconds to update
7. Publish the crates: `cd [crate] && cargo publish` in the order of the list above.
The crates.io index might take some seconds to update
causing an error if the crates are published in quick succession. Wait a couple of seconds and try
again 🙂.

0 comments on commit 6636a46

Please sign in to comment.