diff --git a/pkl-html-highlighter/Cargo.toml b/pkl-html-highlighter/Cargo.toml
index 2a9948fd59..6497e065a5 100644
--- a/pkl-html-highlighter/Cargo.toml
+++ b/pkl-html-highlighter/Cargo.toml
@@ -12,6 +12,10 @@ clap = { version = "4.4.2", features = ["derive"] }
[net]
git-fetch-with-cli = true
+[profile.release]
+lto = true
+codegen-units = 1
+
[[bin]]
name = "pkl-html-highlighter"
path = "src/main.rs"