- The [Rust toolchain](https://www.rust-lang.org/tools/install)
- The [Git version control system](https://git-scm.com/)
- A c++14 compatible compiler to build the tree-sitter grammars, for example GCC or Clang
If you are using the `musl-libc` standard library instead of `glibc` the following environment variable must be set during the build to ensure tree-sitter grammars can be loaded correctly:
```sh
RUSTFLAGS="-C target-feature=-crt-static"
```
1. Clone the repository:
```sh
```sh
git clone https://github.com/helix-editor/helix
git clone https://github.com/helix-editor/helix
cd helix
cd helix
```
```
Compile from source:
2. Compile from source:
```sh
```sh
cargo install --path helix-term --locked
cargo install --path helix-term --locked
```
```
This command will create the `hx` executable and construct the tree-sitter
This command will create the `hx` executable and construct the tree-sitter
grammars in the local `runtime` folder. To build the tree-sitter grammars requires
grammars in the local `runtime` folder.
a c++ compiler to be installed, for example `gcc-c++`.
> 💡 If you are using the musl-libc instead of glibc the following environment variable must be set during the build
> to ensure tree-sitter grammars can be loaded correctly:
>
> ```sh
> RUSTFLAGS="-C target-feature=-crt-static"
> ```
> 💡 Tree-sitter grammars can be fetched and compiled if not pre-packaged. Fetch
> 💡 Tree-sitter grammars can be fetched and compiled if not pre-packaged. Fetch
> grammars with `hx --grammar fetch`(requires `git`) and compile them with
> grammars with `hx --grammar fetch` and compile them with
> `hx --grammar build` (requires a C++ compiler). This will install them in
> `hx --grammar build`. This will install them in
> the `runtime` directory within the user's helix config directory (more
> the `runtime` directory within the user's helix config directory (more