mirror of
https://github.com/LemmyNet/lemmy-docs.git
synced 2025-01-15 22:25:49 +00:00
Adding ~/.cargo/config.toml local dev instructions. (#341)
* Adding ~/.cargo/config.toml local dev instructions. * Use mold and sccache config. * Use then instead of and * Update src/contributors/02-local-development.md Co-authored-by: Nutomic <me@nutomic.com> --------- Co-authored-by: Nutomic <me@nutomic.com>
This commit is contained in:
parent
d6d9615b79
commit
e2d4089545
1 changed files with 11 additions and 0 deletions
|
@ -90,6 +90,17 @@ Use `cargo check` to find compilation errors. To start the Lemmy backend, run `c
|
||||||
|
|
||||||
After making changes, you need to format the code with `cargo +nightly fmt --all` and run the linter with `./scripts/lint.sh`.
|
After making changes, you need to format the code with `cargo +nightly fmt --all` and run the linter with `./scripts/lint.sh`.
|
||||||
|
|
||||||
|
If you'd like to speed up compilation times, you can install [mold](https://github.com/rui314/mold), and [sccache](https://github.com/mozilla/sccache), then add the following to `~/.cargo/config.toml`. Note that the parameter `-Zthreads=x` only works on nightly Rust.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[build]
|
||||||
|
rustc-wrapper = "/usr/bin/sccache"
|
||||||
|
|
||||||
|
[target.x86_64-unknown-linux-gnu]
|
||||||
|
linker = "clang"
|
||||||
|
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Z", "threads=16"]
|
||||||
|
```
|
||||||
|
|
||||||
### Frontend development
|
### Frontend development
|
||||||
|
|
||||||
Install dependencies by running `pnpm i`. Then run `pnpm dev` to launch lemmy-ui locally. It automatically connects to the Lemmy backend on `localhost:8536`. Open [localhost:1234](http://localhost:1234) in your browser. The project is rebuilt automatically when you change any files.
|
Install dependencies by running `pnpm i`. Then run `pnpm dev` to launch lemmy-ui locally. It automatically connects to the Lemmy backend on `localhost:8536`. Open [localhost:1234](http://localhost:1234) in your browser. The project is rebuilt automatically when you change any files.
|
||||||
|
|
Loading…
Reference in a new issue