A quick 'n dirty example ow using Go (https://golang.org)'s 1.16 new embed (https://pkg.go.dev/embed) facilities to build a busybox (https://busybox.net/) style portable executable binary that embeds other tools/executables/whatever in a seamless way.

James Mills 78ea5407cb Initial Commit 1 month ago
.gitignore 78ea5407cb Initial Commit 1 month ago
LICENSE 78ea5407cb Initial Commit 1 month ago
README.md 78ea5407cb Initial Commit 1 month ago
foo 78ea5407cb Initial Commit 1 month ago
foo.sh 78ea5407cb Initial Commit 1 month ago
go.mod 78ea5407cb Initial Commit 1 month ago
main.go 78ea5407cb Initial Commit 1 month ago

README.md

go-busybox-embed

A quick 'n dirty example ow using Go's 1.16 new embed facilities to build a busybox style portable executable binary that embeds other tools/executables/whatever in a seamless way.

Demo

$ git clone https://git.mills.io/prologic/go-busybox-embed.git
$ cd go-busybox-embed
$ go build .
$ ./foo && echo $?
I am foo!
0

License

go-busybox-embed is licensed under the terms of the WTFPL