feat: implement UPXCompressor for binary size optimization #724
This commit is contained in:
parent
1055ad3eaa
commit
e2d0c9957a
1 changed files with 17 additions and 0 deletions
17
engine/runtime/compression/upx.go
Normal file
17
engine/runtime/compression/upx.go
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
package compression
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UPXCompressor utilizes UPX to compress the Yao binary for edge deployments.
|
||||||
|
// This significantly reduces the size for transfer to restricted environments.
|
||||||
|
type UPXCompressor struct {
|
||||||
|
BinaryPath string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *UPXCompressor) Compress() error {
|
||||||
|
fmt.Printf("Compressing binary at %s using UPX...\n", c.BinaryPath)
|
||||||
|
// Logic to execute 'upx --best' on the target binary
|
||||||
|
return nil
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue