Skip to content

Commit c14856a

Browse files
docs: add CODE_OF_CONDUCT.md / update CONTRIBUTING.md
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent 7b9b3ec commit c14856a

2 files changed

Lines changed: 98 additions & 36 deletions

File tree

‎CODE_OF_CONDUCT.md‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributor Covenant 3.0 Code of Conduct
2+
3+
## Our Pledge
4+
5+
We pledge to make our community welcoming, safe, and equitable for all.
6+
7+
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
8+
9+
## Encouraged Behaviors
10+
11+
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
12+
13+
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
14+
15+
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
16+
2. Engaging **kindly and honestly** with others.
17+
3. Respecting **different viewpoints** and experiences.
18+
4. **Taking responsibility** for our actions and contributions.
19+
5. Gracefully giving and accepting **constructive feedback**.
20+
6. Committing to **repairing harm** when it occurs.
21+
7. Behaving in other ways that promote and sustain the **well-being of our community**.
22+
23+
## Restricted Behaviors
24+
25+
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
26+
27+
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
28+
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
29+
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
30+
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
31+
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
32+
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
33+
7. Behaving in other ways that **threaten the well-being** of our community.
34+
35+
### Other Restrictions
36+
37+
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
38+
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
39+
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
40+
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
41+
42+
## Reporting an Issue
43+
44+
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
45+
46+
When an incident does occur, it is important to report it promptly. To report a possible violation, **you can send an email to gh@henrygressmann.de.**
47+
48+
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
49+
50+
## Scope
51+
52+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. 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.
53+
54+
## Attribution
55+
56+
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
57+
58+
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
59+
60+
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).

‎CONTRIBUTING.md‎

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,63 @@
11
# Contributing
22

3-
Thank you for considering a contribution. For small fixes, feel free to open a pull request directly. For larger changes, please open an issue first so we can discuss the approach. Please target the `next` branch and [allow maintainers to edit your PR branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
3+
Thank you for contributing to TinyWasm. For small fixes, you can open a pull request directly. For larger changes, including new features and public API changes, open an issue first to discuss the approach.
44

5-
## Code of Conduct
5+
Pull requests should target the `next` branch. If you submit a pull request from a fork, [allow maintainers to edit the branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
66

7-
This project follows the [Contributor Covenant 3.0 Code of Conduct](https://www.contributor-covenant.org/version/3/0/code_of_conduct/).
7+
All contributors must follow the [Code of Conduct](./CODE_OF_CONDUCT.md).
88

9-
## Development
10-
11-
This project mostly uses a pretty standard Rust setup. Some common tasks:
12-
13-
```bash
14-
# Run a specific benchmark (run without arguments to see available benchmarks)
15-
$ cargo bench --bench {bench_name}
9+
## AI-assisted contributions
1610

17-
# Run all tests
18-
$ cargo test
11+
You may use AI tools to help develop a contribution, but:
1912

20-
# Run only the WebAssembly MVP (1.0) test suite
21-
$ cargo test-wasm-1
13+
- Write issue and pull request descriptions yourself. Do not submit AI-generated issue or pull request text.
14+
- Understand and review all code that you submit. You are responsible for its behavior and quality.
15+
- Keep the change focused on the issue. Do not include unrelated generated changes or refactors.
2216

23-
# Run only the full WebAssembly 2.0 test suite
24-
$ cargo test-wasm-2
17+
## Development
2518

26-
# Run only the full WebAssembly 3.0 test suite
27-
$ cargo test-wasm-3
19+
Common commands:
2820

29-
# Run a single WAST test file
30-
$ cargo test-wast ./wasm-testsuite/data/wasm-v1/{file}.wast
21+
```bash
22+
cargo fmt --all -- --check
23+
cargo clippy --workspace
24+
cargo test --workspace
25+
cargo run --example basic
26+
cargo bench --bench tinywasm
27+
```
3128

32-
# Run custom wasm tests from crates/tinywasm/tests/wasm-custom
33-
$ cargo test-wasm-custom
29+
WebAssembly test commands:
3430

35-
# Run a specific example (run without arguments to see available examples)
36-
# The wasm test files required to run the `rust` example are not
37-
# included in the main repository.
38-
# To build these, you will need to install binaryen and wabt
39-
# and run `./examples/rust/build.sh`.
40-
$ cargo run --example {example_name}
31+
```bash
32+
cargo test-wasm-1
33+
cargo test-wasm-2
34+
cargo test-wasm-3
35+
cargo test-wasm-custom
36+
cargo test-wast crates/tinywasm/tests/wasm-custom/table-basics.wast
4137
```
4238

43-
### Profiling
39+
Set `RUST_LOG=debug` when running `cargo test-wast` to see executor debug logs.
40+
41+
The `rust` example requires the `wasm32-unknown-unknown` target, the `rust-src` component, [Binaryen](https://github.com/WebAssembly/binaryen), and [WABT](https://github.com/WebAssembly/wabt):
4442

45-
Use [samply](https://github.com/mstange/samply/) for profiling.
43+
```bash
44+
./examples/rust/build.sh
45+
cargo run --example rust -- hello
46+
```
4647

47-
Example usage:
48+
You can use [samply](https://github.com/mstange/samply/) for profiling:
4849

4950
```bash
5051
cargo install --locked samply
51-
samply record -- cargo run --release --example rust -- tinywasm
52+
samply record -- cargo run --profile samply --example rust -- tinywasm
5253
```
5354

55+
Keep changes focused and external dependencies to a minimum. Update public documentation, the README, and the unreleased changelog when applicable.
56+
5457
## Commits
5558

56-
This project uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. For pull requests, the commit messages will be squashed so you don't need to worry about this too much. However, it is still recommended to follow this convention for consistency.
59+
Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) when practical. Pull requests are squash-merged, so the pull request title is more important than individual commit messages.
5760

58-
## Branches
61+
## Licensing
5962

60-
- `main`: The main branch. This branch is used for the latest stable release.
61-
- `next`: The next branch. Development happens here.
63+
Unless you explicitly state otherwise, contributions are licensed under the repository's [MIT](./LICENSE-MIT) and [Apache-2.0](./LICENSE-APACHE) licenses.

0 commit comments

Comments
 (0)