## 1. Project Overview & Quickstart (redox-os/redox)

This repository is the **Build System** for Redox OS.

Redox is under active development by a vibrant community, you can see the key links below:

- [The **main website** for Redox OS](https://www.redox-os.org).
- [The Redox Book](https://doc.redox-os.org/book/) and [Build Instructions](https://doc.redox-os.org/book/podman-build.html).
- [Redox Chat and Support](https://matrix.to/#/#redox-join:matrix.org).
- [Patreon](https://www.patreon.com/redox_os), [Donate](https://redox-os.org/donate/) and [Merch](https://redox-os.creator-spring.com/).
- Scroll down for a list of key Redox components and their repositories.

[Redox](https://www.redox-os.org) is an open-source operating system written in Rust, a language with focus on safety, efficiency and high performance. Redox uses a microkernel architecture, and aims to be reliable, secure, usable, correct, and free. Redox is inspired by previous operating systems, such as seL4, MINIX, Plan 9, Linux and BSD.

Redox _is not_ just a kernel, it's a **full-featured operating system**, providing components (file system, display server, core utilities, etc.) that together make up a functional and convenient operating system. Redox uses the COSMIC desktop apps, and provides source code compatibility with many Rust, Linux and BSD programs.

[](./LICENSE)

## More Links

- [Book](https://doc.redox-os.org/book/)
- [Contribute](CONTRIBUTING.md)
- [Hardware Compatibility](https://doc.redox-os.org/book/hardware-support.html)
- Run Redox in a [Virtual Machine](https://doc.redox-os.org/book/running-vm.html) or on [Real Hardware](https://doc.redox-os.org/book/real-hardware.html)
- [Trying Out Redox](https://doc.redox-os.org/book/trying-out-redox.html)
- [Building Redox](https://doc.redox-os.org/book/podman-build.html)
- [Build System Documentation](https://doc.redox-os.org/book/build-system-reference.html)
- [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html)
- [Chat/Discussions/Help](https://doc.redox-os.org/book/chat.html)

## Ecosystem

Some of the key repositories on the Redox GitLab:

| Essential Repositories                                                               | Maintainer
|-------------------------------------------------------------------------------------------------------------|---------------------------
| [Kernel](https://gitlab.redox-os.org/redox-os/kernel)                                                       | **@jackpot51**
| [Base (essential system components and drivers)](https://gitlab.redox-os.org/redox-os/base)                             | **@jackpot51**
| [RedoxFS (default filesystem)](https://gitlab.redox-os.org/redox-os/redoxfs)                                | **@jackpot51**
| [relibc (C POSIX library written in Rust)](https://gitlab.redox-os.org/redox-os/relibc)                     | **@jackpot51**
| [Ion (defauilt shell)](https://gitlab.redox-os.org/redox-os/ion)                                            | **@jackpot51**
| [Termion (terminal library)](https://gitlab.redox-os.org/redox-os/termion)                                  | **@jackpot51**
| [pkgutils (current package manager)](https://gitlab.redox-os.org/redox-os/pkgutils)                         | **@jackpot51**
| [Orbital (display server and window manager)](https://gitlab.redox-os.org/redox-os/orbital)                 | **@jackpot51**
| This repo - the root of the Build System                                                                    | **@jackpot51** **@hatred_45**
| [Redoxer (tool for easy Redox development on Linux)](https://gitlab.redox-os.org/redox-os/redoxer)          | **@jackpot51**
| [The Redox Book](https://gitlab.redox-os.org/redox-os/book)                                                 | **@jackpot51** **@hatred_45**
| [Website](https://gitlab.redox-os.org/redox-os/website)                                                     | **@jackpot51** **@hatred_45**

## What it looks like

See [Redox in Action](https://www.redox-os.org/screens/) for photos and videos.

## 2. Official Technical Reference & Guides (redox-os/website)

# Website

This is the source for [redox-os.org](https://redox-os.org) website.

## Setup

To build this site, you must install [Hugo](https://gohugo.io/) and [Nodejs](https://nodejs.org/) and run the `hugo.sh` file. 

### Install Hugo

You can install Hugo from automated script using [webi](https://webinstall.dev/hugo)

```sh
curl -sS https://webi.sh/hugo | sh; \
source ~/.config/envman/PATH.env
```

Or install it manually:
- Download the executable for your CPU architecture on [this](https://github.com/gohugoio/hugo/releases/latest) link
- Move the extracted `hugo` file to the `~/.local/bin` directory on your user folder
- Verify if the `~/.local/bin` is present on your `PATH` (run `echo $PATH` to verify)
- If the `~/.local/bin` directory is not present on your `PATH` environment variable, you must add it on the configuration file of your terminal shell

### Install Nodejs

NOTE: Nodejs is only needed for PostCSS during building the site. You can skip Node.js if you only want to preview the site.

You can install Nodejs from automated script using [webi](https://webinstall.dev/node)

```sh
curl -sS https://webi.sh/node | sh; \
source ~/.config/envman/PATH.env
```

Or install it manually:

- Download the executable for your CPU architecture on [this](https://nodejs.org/en/download#:~:text=get%20a%20prebuilt%20Node.js%C2%AE) link
- Move the extracted `node` file to the `~/.local/bin` directory on your user folder
- Verify if the `~/.local/bin` is present on your `PATH` (run `echo $PATH` to verify)
- If the `~/.local/bin` directory is not present on your `PATH` environment variable, you must add it on the configuration file of your terminal shell


### Bash PATH

To add the `~/.local/bin` directory on the `PATH` of your GNU Bash, add the following text on the end of the `.bashrc` file at your user folder:

```sh
export PATH=$PATH:$HOME/.local/bin
```

## Preview

To preview the site, run the following command, wait it to finish and open the link http://localhost:1313

```sh
./hugo.sh serve
```

The `hugo.sh` is a script that enables content written for the English language webpage (in the `content/` directory) to be visible in pages of other languages.  

But this results in a quirk where _hugo_ does not watch for changes in the `content/` directory when you use `./hugo.sh serve` command.  

So, you can use the `hugo serve` command instead, which makes sure that `content/` directory is also watched (just for when you're writing the pages).

## Verify Broken Links

Use the [lychee](https://lychee.cli.rs/) tool to verify broken links, it's very advanced and fast.

Read [this](https://lychee.cli.rs/installation/) page to install the tool.

## Customizing Bulma

The [bulma.css](assets/css/bulma.css) used in this page is a trimmed version from [the production CSS](https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.4/css/bulma.css). We're not using the v1 version because Netsurf can't use CSS variables which v1 is heavily using it.

To add more classes from Bulma, copy the full production CSS into [bulma.css](assets/css/bulma.css) then run `hugo` to create another trimmed version of it using PostCSS, then copy the generated bulma.css back into the repository.

### Usage

Run the following command inside the repository folder:

```sh
lychee content
```