From a2d6beea20fa8862340a81d4f6e6236a8b823394 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 3 Jan 2025 13:56:55 -0500 Subject: [PATCH] Adding ~/.cargo/config.toml local dev instructions. --- src/contributors/02-local-development.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/contributors/02-local-development.md b/src/contributors/02-local-development.md index 3d31488..51759b8 100644 --- a/src/contributors/02-local-development.md +++ b/src/contributors/02-local-development.md @@ -90,6 +90,16 @@ 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`. +If you'd like to speed up compilation times, you can add the following to `~/.cargo/config.toml` (requires nightly rust). + +```toml +[unstable] +codegen-backend = true + +[build] +rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zthreads=16"] +``` + ### 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.