Remove kernel section/HTML syntax and update internal hyperlinks.

This commit is contained in:
Ribbon 2023-02-28 08:18:45 +00:00
parent f42a7ebb16
commit 84f87c2892

View file

@ -6,28 +6,26 @@ _**Thank you for your interest in contributing to Redox!** This document will ou
* [Communication](#communication)
* [Chat](#chat)
* [GitLab Issues](#issues)
* [Pull Requests](#prs)
* [Low-Hanging Fruit - Easy Targets for Newbies](#easy-targets)
* [Best Practices/Guidelines](#best-practices)
* [GitLab Issues](#gitlab-issues)
* [Pull Requests](#pull-requests)
* [Best Practices/Guidelines](#best-practices-and-guidelines)
* [General](#general)
* [Kernel](#kernel)
* [Testing Practices](#testing-practices)
* [Style Guidelines](#style-guidelines)
* [Rust](#rust-style-guidelines)
* [Rust](#rust)
* [Git](#git-style-guidelines)
* [Other Ways to Contribute](#other)
* [Graphic Design](#graphic-design)
* [Other Ways to Contribute](#other-ways-to-contribute)
* [Design](#design)
## <a name="extern-links"> Other External Links </a>
## Other External Links
* [redox-os.org](https://redox-os.org)
* [rust-os-comparison](https://github.com/flosse/rust-os-comparison)
* [rust-lang.org](http://rust-lang.org)
## <a name="communication"> Communication </a>
## Communication
### <a name="chat"> Chat </a>
### Chat
- [Redox Dev room]
- [Redox Support room]
@ -35,42 +33,36 @@ _**Thank you for your interest in contributing to Redox!** This document will ou
[Redox Dev room]: https://matrix.to/#/#redox-dev:matrix.org
[Redox Support room]: https://matrix.to/#/#redox-support:matrix.org
### <a name="issues"> GitLab Issues </a>
### GitLab Issues
A bit more formal way of communication with fellow Redox devs, but a little less quick and convenient like the chat. Submit an issue when you run into problems compiling, testing, or just would like to discuss a certain topic, be it _features, code style, code inconsistencies, minor changes and fixes, etc._
### <a name="prs"> Pull Requests </a>
### Pull Requests
[How to make pull requests properly]: https://doc.redox-os.org/book/ch12-04-creating-proper-pull-requests.html
## <a name="best-practices"> Best Practices and Guidelines </a>
## Best Practices and Guidelines
### <a name="general"> General </a>
### General
* **Remember to do a `git rebase -i upstream/master` before you send your patch!**
* **Make sure your code is readable, commented, and well-documented.**
* **Don't hesitate to ask for help, comments or suggestions!**
* **Before implementing something, discuss it! Open an issue, or ask in the chat.**
### <a name="kernel"> Kernel </a>
* When trying to access a slice, **always** use the `common::GetSlice` trait and the `.get_slice()` method to get a slice without causing the kernel to panic.
The problem with slicing in regular Rust, e.g. `foo[a..b]`, is that if someone tries to access with a range that is out of bounds of an array/string/slice, it will cause a panic at runtime, as a safety measure. Same thing when accessing an element.
Always use `foo.get(n)` instead of `foo[n]` and try to cover for the possibility of `Option::None`. Doing the regular way may work fine for applications, but never in the kernel. No possible panics should ever exist in kernel space, because then the whole OS would just stop working.
### <a name="testing-practices"> Testing Practices </a>
### Testing Practices
* It's always better to test boot (`make qemu` or `make virtualbox`) every time you make a change, because it is important to see how the OS boots and works after it compiles.
Even though Rust is a safety-oriented language, something as unstable and low-level as an in-dev operating system will almost certainly have problems in many cases and may completely break on even the slightest critical change.
Also, make sure you check how the unmodified version runs on your machine before making any changes. Else, you won't have anything to compare to, and it will generally just lead to confusion. TLDR: Rebuild and test boot often.
## <a name="style-guidelines"> Style Guidelines </a>
## Style Guidelines
### <a name="rust-style-guidelines"> Rust </a>
### Rust
Since **Rust** is a relatively small and new language compared to others like _C_, there's really only one standard. Just follow the official Rust standards for formatting, and maybe run `rustfmt` on your changes, until we setup the CI system to do it automatically.
### <a name="git-style-guidelines"> Git </a>
### Git
* You should have a fork of the repository on **GitLab** and a local copy on your computer. The local copy should have two remotes; `origin` and `fork`, `origin` should be set to the main repository and `fork` should be your fork.
* When you start to make changes, you will want to create a separate branch, and keep the `master` branch of your fork identical to the main repository, so that you can compare your changes with the main branch and test out a more stable build if you need to.
@ -79,10 +71,10 @@ Since **Rust** is a relatively small and new language compared to others like _C
* Commit messages should describe their changes in present tense, e.g. "`Add stuff to file.ext`" instead of "`added stuff to file.ext`". This makes sense as sometimes when you revert back, then run through commits one-by-one, you want to see what a commit will do, instead of just what the person did when they made the commit. It's also just being consistent.
* Try to remove useless duplicate/merge commits from PRs as these don't do anything except clutter up history and make it harder to read.
## <a name="other"> Other Ways to Contribute </a>
## Other Ways to Contribute
If you're not big on coding, but you still want to help keep the project going, you can still contribute/support in a variety of ways! We'll try to find a way to use anything you have to offer.
### <a name="design"> Design </a>
### Design
If you're a good designer, whether it's _2D graphics, 3D graphics, interfaces, web design, you can help. We need logos, UI design, UI skins, app icons, desktop backgrounds, etc_. More information to come on this in the future, for now just join [the chat](#chat) and ask about graphic design.