diff options
| author | Henry <mail@henrygressmann.de> | 2026-08-24 15:58:09 +0200 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2026-08-24 15:58:09 +0200 |
| commit | c14856a9dd772e50c0c789cc3d28a8c9e13afbbc (patch) | |
| tree | 02abfd776e8d810cbcd860eba52a27f79e40db8b | |
| parent | 7b9b3ec681e68280399d9c67e01433c2d3acb6c2 (diff) | |
docs: add CODE_OF_CONDUCT.md / update CONTRIBUTING.md
Signed-off-by: Henry <mail@henrygressmann.de>
| -rw-r--r-- | CODE_OF_CONDUCT.md | 60 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 74 |
2 files changed, 98 insertions, 36 deletions
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..8dd98a5 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,60 @@ +# Contributor Covenant 3.0 Code of Conduct + +## Our Pledge + +We pledge to make our community welcoming, safe, and equitable for all. + +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. + +## Encouraged Behaviors + +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. + +With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including: + +1. Respecting the **purpose of our community**, our activities, and our ways of gathering. +2. Engaging **kindly and honestly** with others. +3. Respecting **different viewpoints** and experiences. +4. **Taking responsibility** for our actions and contributions. +5. Gracefully giving and accepting **constructive feedback**. +6. Committing to **repairing harm** when it occurs. +7. Behaving in other ways that promote and sustain the **well-being of our community**. + +## Restricted Behaviors + +We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct. + +1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop. +2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people. +3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits. +4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community. +5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission. +6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group. +7. Behaving in other ways that **threaten the well-being** of our community. + +### Other Restrictions + +1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions. +2. **Failing to credit sources.** Not properly crediting the sources of content you contribute. +3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community. +4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors. + +## Reporting an Issue + +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. + +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.** + +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. + +## Scope + +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. + +## Attribution + +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/). + +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/) + +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). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73186e7..776b132 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,61 +1,63 @@ # Contributing -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). +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. -## Code of Conduct +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). -This project follows the [Contributor Covenant 3.0 Code of Conduct](https://www.contributor-covenant.org/version/3/0/code_of_conduct/). +All contributors must follow the [Code of Conduct](./CODE_OF_CONDUCT.md). -## Development - -This project mostly uses a pretty standard Rust setup. Some common tasks: - -```bash -# Run a specific benchmark (run without arguments to see available benchmarks) -$ cargo bench --bench {bench_name} +## AI-assisted contributions -# Run all tests -$ cargo test +You may use AI tools to help develop a contribution, but: -# Run only the WebAssembly MVP (1.0) test suite -$ cargo test-wasm-1 +- Write issue and pull request descriptions yourself. Do not submit AI-generated issue or pull request text. +- Understand and review all code that you submit. You are responsible for its behavior and quality. +- Keep the change focused on the issue. Do not include unrelated generated changes or refactors. -# Run only the full WebAssembly 2.0 test suite -$ cargo test-wasm-2 +## Development -# Run only the full WebAssembly 3.0 test suite -$ cargo test-wasm-3 +Common commands: -# Run a single WAST test file -$ cargo test-wast ./wasm-testsuite/data/wasm-v1/{file}.wast +```bash +cargo fmt --all -- --check +cargo clippy --workspace +cargo test --workspace +cargo run --example basic +cargo bench --bench tinywasm +``` -# Run custom wasm tests from crates/tinywasm/tests/wasm-custom -$ cargo test-wasm-custom +WebAssembly test commands: -# Run a specific example (run without arguments to see available examples) -# The wasm test files required to run the `rust` example are not -# included in the main repository. -# To build these, you will need to install binaryen and wabt -# and run `./examples/rust/build.sh`. -$ cargo run --example {example_name} +```bash +cargo test-wasm-1 +cargo test-wasm-2 +cargo test-wasm-3 +cargo test-wasm-custom +cargo test-wast crates/tinywasm/tests/wasm-custom/table-basics.wast ``` -### Profiling +Set `RUST_LOG=debug` when running `cargo test-wast` to see executor debug logs. + +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): -Use [samply](https://github.com/mstange/samply/) for profiling. +```bash +./examples/rust/build.sh +cargo run --example rust -- hello +``` -Example usage: +You can use [samply](https://github.com/mstange/samply/) for profiling: ```bash cargo install --locked samply -samply record -- cargo run --release --example rust -- tinywasm +samply record -- cargo run --profile samply --example rust -- tinywasm ``` +Keep changes focused and external dependencies to a minimum. Update public documentation, the README, and the unreleased changelog when applicable. + ## Commits -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. +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. -## Branches +## Licensing -- `main`: The main branch. This branch is used for the latest stable release. -- `next`: The next branch. Development happens here. +Unless you explicitly state otherwise, contributions are licensed under the repository's [MIT](./LICENSE-MIT) and [Apache-2.0](./LICENSE-APACHE) licenses. |
