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"
|
||||
harness = true
|
||||
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
strip = true
|
||||
|
||||
[profile.test]
|
||||
# Run CLI tests serially to share single server instance
|
||||
opt-level = 0
|
||||
|
|
|
|||
|
|
@ -111,7 +111,9 @@
|
|||
]
|
||||
++ (with pkgs; [
|
||||
cargo-watch
|
||||
clang
|
||||
flyctl
|
||||
lld
|
||||
nil
|
||||
nixfmt
|
||||
openssl
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
type="module"
|
||||
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-RC.6/bundles/datastar.js"
|
||||
></script>
|
||||
<script src="/components/photo-capture.js"></script>
|
||||
<script src="/components/searchable-select.js"></script>
|
||||
<script defer src="/components/photo-capture.js"></script>
|
||||
<script defer src="/components/searchable-select.js"></script>
|
||||
{% block head %}{% endblock %}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue