浏览代码

Make the release binary smaller

Benjamin Sago 4 年之前
父节点
当前提交
c1aa686859
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 4 0
      Cargo.toml
  2. 1 0
      Justfile

+ 4 - 0
Cargo.toml

@@ -18,6 +18,10 @@ members = [
   "dns-transport",
 ]
 
+[profile.release]
+lto = true
+overflow-checks = true
+panic = "abort"
 
 [dependencies]
 

+ 1 - 0
Justfile

@@ -11,6 +11,7 @@ export DOG_DEBUG := ""
 # compiles the dog binary (in release mode)
 @build-release:
     cargo build --release --verbose
+    strip target/release/dog
 
 # runs unit tests
 @test: