perf(build): add release profile, lld linker, and defer script tags
- Add [profile.release] with thin LTO and symbol stripping - Configure lld linker via .cargo/config.toml for faster linking - Add clang and lld to Nix devShell - Add defer attribute to component script tags to unblock HTML parsing
This commit is contained in:
parent
4fb2e945a4
commit
5c75c39883
4 changed files with 13 additions and 2 deletions
5
.cargo/config.toml
Normal file
5
.cargo/config.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[target.x86_64-unknown-linux-gnu]
|
||||||
|
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-gnu]
|
||||||
|
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
||||||
|
|
@ -54,6 +54,10 @@ name = "cli"
|
||||||
path = "tests/cli/main.rs"
|
path = "tests/cli/main.rs"
|
||||||
harness = true
|
harness = true
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
lto = "thin"
|
||||||
|
strip = true
|
||||||
|
|
||||||
[profile.test]
|
[profile.test]
|
||||||
# Run CLI tests serially to share single server instance
|
# Run CLI tests serially to share single server instance
|
||||||
opt-level = 0
|
opt-level = 0
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,9 @@
|
||||||
]
|
]
|
||||||
++ (with pkgs; [
|
++ (with pkgs; [
|
||||||
cargo-watch
|
cargo-watch
|
||||||
|
clang
|
||||||
flyctl
|
flyctl
|
||||||
|
lld
|
||||||
nil
|
nil
|
||||||
nixfmt
|
nixfmt
|
||||||
openssl
|
openssl
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
type="module"
|
type="module"
|
||||||
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-RC.6/bundles/datastar.js"
|
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-RC.6/bundles/datastar.js"
|
||||||
></script>
|
></script>
|
||||||
<script src="/components/photo-capture.js"></script>
|
<script defer src="/components/photo-capture.js"></script>
|
||||||
<script src="/components/searchable-select.js"></script>
|
<script defer src="/components/searchable-select.js"></script>
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue