Goã§ãã¯ãã¹ãã©ãããã©ãŒã ã¯ãã³ã³ãã€ã«ãã¡ãŒã ãç¹å¥ã«æ§æãããéçºç°å¢ãã¢ã»ã³ããªçšã®ä»®æ³ãã·ã³ããŸãã¯chroot / docker-devãœãªã¥ãŒã·ã§ã³ãåããŠå®å šã«æŸæ£ã§ããã¬ãã«ã«éããŸããã ãããŠãããã¯ããäžã€ã®é倧ãªã²ãŒã ãã§ã³ãžã£ãŒã§ããããã«ã€ããŠãäŸãæããŠè©±ãããŠãèŠããã
è¡ãã
ãåç¥ã®ããã«ãGoã¯åçãªã³ã¯ãæå³çã«æåŠããŸãã-ãã®äž»ãªçç±ã¯ãGoã®ã»ãŒãã¹ãŠã®åŽé¢ã®èšèšã«é¢ããéåžžã®èª¬æãšéåžžã«ãã䌌ãŠããŸã-ã[åçãªã³ã¯]ã®å©ç¹ã¯ããã®æ¬ ç¹ãšã¢ãŒããã¯ãã£ã«ããããè€éããããã¯ããã«å°ãªãã§ãã ããŠãåçãªã³ã¯ã®åºçŸã®äž»ãªçç±ã¯ããªãœãŒã¹ã ãã§ãªããäž»ã«ãã£ã¹ã¯ã¹ããŒã¹ãšã¡ã¢ãªãç¯çŽããããšãã欲æ±ã§ãããããã¯ããµãŒããŒã ãã§ãªããçµã¿èŸŒã¿ããã€ã¹ïŒããªã³ãã¿ãŒã GB RAMïŒïŒã äžè¬ã«ãåå¥ã®ãªã³ã¯æ¹æ³ã®é·æãšçæããªã¹ããããšãå¥ã®æçš¿ã«ç§»åãããããçŸæç¹ã§ã¯ãã®ãŸãŸåãå ¥ããŸããGoã§ã¯ãåºåã«åžžã«éçãã€ããªããããŸãã
çŸåšãGo 1.4.1ã®çŸåšã®ããŒãžã§ã³ã§ã¯ã次ã®ãã©ãããã©ãŒã ããµããŒããããŠããŸãã
- Linux 2.6 1以é-amd64ã386ãarm
- MacOS X 10.6以é-amd64,386
- Windows XP以é -amd64ã386
- FreeBSD 8以é-amd64ã386ãarm
- NetBSD -amd64ã386ãã¢ãŒã
- OpenBSD -amd64ã386
- DragonFly BSD -amd64ã386
- ãã©ã³9 -amd64ã386
- Google Native Client -amd64p32ã386
- Android-ã¢ãŒã
1-ã«ãŒãã«2.6.23以éã¯å ¬åŒã«ãµããŒããããŠããŸãããå®éã«ã¯ãã¹ãŠããã©ã³ã2.6ã®ä»¥åã®ã«ãŒãã«ã§åäœããŸã-ããšãã°ãå€ãã®äººã2.6.18ã®RHEL5 / CentOS5ã§Goã䜿çšããŠããŸãã
Go 1.5 㯠iOS ããµããŒãããäºå®ã§ãã
ãŸããæåã¯Goã§WindowsããµããŒããããŠããªãã£ãããšã泚ç®ã«å€ããŸã-ããŒã ã¯å°ãããWindowsã®ã³ãŒãå®è£ ã
以äžã§èª¬æããããã»ã¹ã¯ãã¹ãŠã®ãã©ãããã©ãŒã ã§å®å šã«åäžã§ããïŒAndroidããã³ãã€ãã£ãã¯ã©ã€ã¢ã³ãïŒNaClïŒã¯äŸå€ã§ãè¿œå ã®ãžã§ã¹ãã£ãŒãå¿ èŠã§ãïŒããã®èšäºã®æ®ãã®éšåã§ã¯ãæã人æ°ã®ãã3ã€ã®ãã¹ã¯ãããã®ããããã䜿çšããŠãããšæ³å®ããŸããã©ãããã©ãŒã -LinuxãMacOS XãŸãã¯Windowsã ããã«ãããç°¡åã«ããããã«ãCã©ã€ãã©ãªã«ãªã³ã¯ããå¿ èŠããªãïŒãããã£ãŠãcgo / gccã䜿çšããå¿ èŠããªãïŒGoã³ãŒãã®ã¿ãèšè¿°ããŠäœ¿çšããããšãæå³ããŸãã å¥ã®ã±ãŒã¹ããããŸã-cgoã«é¢é£ä»ããããæšæºã©ã€ãã©ãªã®å€æ°ã®é¢æ°ã䜿çšããå¿ èŠãããå Žåã§ãããããã«ã€ããŠã¯æåŸã®å¥ã®ç« ã§èª¬æããŸãã
ããŒã«ãã§ãŒã³ã®æºå
å®è¡ããå¿ èŠãããæåã®ã¹ãããã¯ãç®çã®ãã©ãããã©ãŒã çšã®ããŒã«ãã§ãŒã³ãæ§ç¯ããããšã§ãã
GoãœãŒã¹ã³ãŒãïŒ$ GOROOT / srcãåžžã«ãã·ã³äžã«ãããŸãïŒã䜿çšããŠãã£ã¬ã¯ããªã«ç§»åããWindows / amd64ãªã©ã®ç®çã®ãã©ãããã©ãŒã çšã«åæ§ç¯ããŸãã
cd $(go env GOROOT)/src sudo GOOS=windows GOARCH=amd64 CGO_ENABLED=0 ./make.bash --no-clean
ãã®ããã»ã¹ã¯ãMacbook Air 2012ã§ã¯çŽ26ç§ããããŸãã make.bashã¹ã¯ãªããã¯ããœãŒã¹ããã€ã³ã¹ããŒã«ããå Žåã«Goãã€ã³ã¹ããŒã«ããæšæºã®Goãã«ãã¹ã¯ãªããã§ãã å®éã«ã¯ãGoãšæšæºã©ã€ãã©ãªå šäœãåéããŸãããä»åã®ã¿-windows / amd64ãã©ãããã©ãŒã çšã§ãã
ãŸããäžèšã®çç±ã«ãããCGOãµããŒããç¡å¹ã«ããŸããã
GOOSããã³GOARCHå€
å€ã®ããŒãã«GOOSïŒHabréã§50ïŒ ã®å¹ ã§ããŒãã«ãäœæããæ¹æ³ãç¥ã£ãŠããå Žå-æããŠãã ããïŒïŒ
OS | $ GOOS |
---|---|
Linux | Linux |
MacOS x | ããŒãŠã£ã³ |
çª | çª |
Freebsd | freebsd |
Netbsd | netbsd |
Openbsd | openbsd |
DragonFly BSD | ãã³ã |
èšç»9 | plan9 |
ãã€ãã£ãã¯ã©ã€ã¢ã³ã | ããã¯ã« |
Android | ã¢ã³ããã€ã |
ãããŠGOARCHïŒ
å»ºç¯ | $ GOARCH |
---|---|
x386 | 386 |
AMD64 | amd64 |
32åã®ãã€ã³ã¿ãŒãåããAMD64 | amd64p32 |
è | è |
äŸ1. Linux for Windowsã§äœæããã³ã³ã³ãã€ã«ãããWebãµãŒããŒ
ã³ãã³ãã©ã€ã³ã解æããããã«ãããã€ãã®èšèª/ã©ã€ãã©ãªãããGoã§äœæããæ¹ãç°¡åãªåçŽãªWebãµãŒããŒãäœæããŸãã
package main import ( "log" "net/http" ) func Handler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello, world\n")) } func main() { http.HandleFunc("/", Handler) log.Println("Starting HTTP server on :1234") log.Fatal(http.ListenAndServe(":1234", nil)) }
ãããŠã32ãããçãš64ãããçã®Windowsçšã«ãŸãšããŸãã
GOOS=windows GOARCH=386 go build -o http_example.exe GOOS=windows GOARCH=amd64 go build -o http_example64.exe
ç§ãã¡ã¯ãã§ãã¯ããŸãïŒ
$ file http_example*.exe http_example.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit http_example64.exe: PE32+ executable for MS Windows (console) Mono/.Net assembly
äž¡æ¹ã®ãã€ããªãã¿ãŒã²ããWindowsã·ã¹ãã ã«ã³ããŒããæºåãã§ããŠãããåäœãããšããããšãèšãå¿ èŠã¯ãªããšæããŸãã
äŸ2. Nokia N9é»è©±ã®ARMã§ã®ã¯ãã¹ã³ã³ãã€ã«
ããã«çµã¿èŸŒã¿ããã€ã¹ãšå¯æ¥ã«é£æºããŠããªããšèšããŸãã®ã§ã詳现ã¯ããããªããããããŸããããããã£ãŠããã®ãããã¯ãæãäžããªãããã«åªããŸãããäžè¬çã«ã¯åã蟌ã¿ãªã³ã®ç¶æ³ã«åŸããŸãã äžè¬çã«ãGoã¯çµã¿èŸŒã¿ãã©ãããã©ãŒã çšã®èšèªãšããŠäœçœ®ä»ããããŠããŸããã§ãããããã®é åã§Goãç©æ¥µçã«äœ¿çšãå§ããããšã劚ãããã®ã§ã¯ãããŸããã§ããã ãããããã®çç±ã¯ãçµã¿èŸŒã¿æ¥çãé£èºãéããããããçµã¿èŸŒã¿ãããã€ã¹ã¯ãã¯ãéåžžã«å°ãªããªãœãŒã¹ãæå³ãããGoã§ã¡ã¢ãªãç¯çŽããããšãæ¯æããªããã¬ãŒããªãã¯ãå®éã«ã¯ããŸãå ·äœçã§ã¯ãªãããšãå€æããŸããããå®éã«ã¯- Goã¯æ¢ã«Gobot ïŒArduinoãRaspberry PIãBeagleboneããLeapMotionãPebbleãArDroneãŸã§ã®ãã©ãããã©ãŒã å šäœã®ãããããã¬ãŒã ã¯ãŒã¯ïŒãEMBDïŒãããŒããŒããæäœããããã®ãã¬ãŒã ã¯ãŒã¯ïŒãªã©ã®å€ãã®ãããžã§ã¯ããäœæããŠãã ãPayPal ã¯æ°å¹Žé䜿çšããŠããŸãã¯ã€ã€ã¬ã¹ã®å°åæãšæ¯æãã®ããã«ããŒã³ã³ããã€ã¹ã«ç§»åããŸã ã
ããšãã°ãNokia N9ïŒãŸãã¯ã©ãããŒãªN950ïŒã䜿çšããŠãäžèšã®äŸãåéããŸãã
GOOS=linux GOARCH=arm go build -o http_example_arm scp http_example_arm developer@192.168.2.16:/home/user/
ã¯ãããšãŠãç°¡åã§ãã
å®éãARMãã©ãããã©ãŒã ã®å ŽåãGOARMãã©ã°ãæå®ããå¿ èŠããããŸãããããã§ãããŒãžã§ã³ãããã©ã«ãã§é©åããªãå Žåãã¿ãŒã²ãããã©ãããã©ãŒã äžã®ãã€ããªã¯æ¬¡ã®ãããªæ確ãªã¡ãã»ãŒãžã衚瀺ããŸãã
runtime: this CPU has no floating point hardware, so it cannot run this GOARM=7 binary. Recompile using GOARM=5.
ããã»ã¹ãèªååãã
ãã«ãã«é²ãåã«åäžã®å€æ°ãæå®ããæ¹ãç°¡åãããããŸããã ãã ããã³ãŒããåéããŠ1æ¥100åç°ãªããã©ãããã©ãŒã ã«ãããã€ããå¿ èŠãããå ŽåããããŸãã ãã®ãããªã¿ã¹ã¯ã«ã¯ãããŒã«ãã§ãŒã³ã®æºåããã»ã¹ãèªååããç®çã®ãã©ãããã©ãŒã ã®ã³ãŒããçŽæ¥çµã¿ç«ãŠãããã®ãããžã§ã¯ããããã€ããããŸãã
ãŽãã¯ã¹
ãªã³ã¯ïŒ github.com/mitchellh/gox
ãã¹ãŠã®å¯èœãªããŒã«ãã§ãŒã³ã®ã€ã³ã¹ããŒã«ãšæºåãäžåºŠã«ïŒ
go get github.com/mitchellh/gox gox -build-toolchain ...
ä»ããgo buildãã®ä»£ããã«ããgoxããæžããŸãã
$ gox Number of parallel builds: 4 --> darwin/386: github.com/mitchellh/gox --> darwin/amd64: github.com/mitchellh/gox --> linux/386: github.com/mitchellh/gox --> linux/amd64: github.com/mitchellh/gox --> linux/arm: github.com/mitchellh/gox --> freebsd/386: github.com/mitchellh/gox --> freebsd/amd64: github.com/mitchellh/gox --> openbsd/386: github.com/mitchellh/gox --> openbsd/amd64: github.com/mitchellh/gox --> windows/386: github.com/mitchellh/gox --> windows/amd64: github.com/mitchellh/gox --> freebsd/arm: github.com/mitchellh/gox --> netbsd/386: github.com/mitchellh/gox --> netbsd/amd64: github.com/mitchellh/gox --> netbsd/arm: github.com/mitchellh/gox --> plan9/386: github.com/mitchellh/gox
ç¹å®ã®ããã±ãŒãžãŸãã¯ç¹å®ã®ãã©ãããã©ãŒã ãæå®ã§ããŸãã
gox -os="linux" gox -osarch="linux/amd64" gox github.com/divan/gorilla-xmlrpc/xml
æ®ãã®ã³ãã³ãã©ã€ã³åŒæ°ã¯ãgo buildãšåãã§ãã çŽèŠ³çã§ãã
Gocx
GoCXã¯ãã¯ãã¹ã³ã³ãã€ã«æ©èœã®æãæåãªã©ãããŒã®1ã€ã§ãããããã±ãŒãžåïŒ.debãå®è¡ããããšãã§ããŸãïŒããã³èªåã¢ã»ã³ããªçšã®ããŸããŸãªãã³ã«éç¹ã眮ããŠããŸãã ç§ã¯èªåã§äœ¿çšããªãã£ãã®ã§ãèå³ããã人ã¯ãµã€ããšããã¥ã¡ã³ããã芧ãã ããã
github.com/laher/goxc
CGOãç解ãã
ãã³ããŒã§éå¬ãããGopherCon 2014ã«ã³ãã¡ã¬ã³ã¹ã®ãããªãèŠã人ã¯ãããããAlan Shreveã® ãGoã§éçºããŒã«ãæ§ç¯ããããšãã話ãèŠããŠããã§ãããã -ã³ã³ãã€ã«ããã€ãã£ãã«ã³ã³ãã€ã«ããŸãã " 次ã¯èª¬æã§ã-çç±ã¯Cgoã§ãã cgoã䜿çšããå¿ èŠããªãå Žåã¯ããã¹ãŠåé¡ãããŸããã å®éãç¹å®ã®Goã³ãŒãã®ããäžéšã«ãµãŒãããŒãã£ã®Cã©ã€ãã©ãªãå¿ èŠã§ãã åé¡ã¯äœã§ããïŒ
åé¡ã¯ãæšæºã©ã€ãã©ãªã®äžéšã®æ©èœãcgoã«äŸåããŠããããšã§ãã ã€ãŸããGoãCGO_ENABLED = 0ã§åéãããšããããã¯åã«äœ¿çšã§ããªããªããã³ã³ãã€ã«æ®µéã§ãšã©ãŒãçºçããŸãã éåžžã«äŸ¿å©ã§çŸããåé¿çããããšããäºå®ã«ãããããããæšæºã©ã€ãã©ãªã®å 容ãcgoã«ã©ã®ããã«äŸåããŠããããèŠãŠã¿ãŸãããã
幞ããªããšã«ãããã¯ç°¡åã§ãã
# cd $(go env GOROOT)/src/ # grep -re "^// +build.*[^\!]cgo" * crypto/x509/root_cgo_darwin.go:// +build cgo net/cgo_android.go:// +build cgo,!netgo net/cgo_linux.go:// +build !android,cgo,!netgo net/cgo_netbsd.go:// +build cgo,!netgo net/cgo_openbsd.go:// +build cgo,!netgo net/cgo_unix_test.go:// +build cgo,!netgo os/user/lookup_unix.go:// +build cgo runtime/crash_cgo_test.go:// +build cgo
ãããã®ãã¡ã€ã«ã«ã€ããŠç°¡åã«èª¬æããŸãã
- crypto / x509 / root_cgo_darwin.go -MacOS Xã§ã«ãŒãX.509蚌ææžãååŸããããã®1ã€ã®é¢æ°ãå®è£ ããŸãããã®æ©èœãæ瀺çã«äœ¿çšããªãå Žå-cgoããªããŠãåé¡ã¯ãããŸããã
- net / cgo_android / linux / netbsd / openbsd / cgo_unix_test.go-ç°ãªãUNIXã§ãã€ãã£ãDNSãªãŸã«ããŒã䜿çšããããã«å¿ èŠãªã³ãŒãã 以äžã®è©³çŽ°ã
- os / user / lookup_unix.go -os / userããã±ãŒãžã®é¢æ°-çŸåšã®ãŠãŒã¶ãŒã«é¢ããæ å ±ïŒuidãgidãusernameïŒãååŸããŸãã passwdãšã³ããªãèªã¿åãããã«getpwuid_r ïŒïŒã«ãã£ãŠäœ¿çšãããŸã
- runtime / crash_cgo_test.go-ããã¯ãåŠçããããã®ãã¹ããå«ããã¡ã€ã«ãé¢é£æ§ãªã
次ã«ãDNSãªãŸã«ãã«ã€ããŠè©³ãã説æããŸãã
ãã®ãªã¹ãã®åãã¡ã€ã«ïŒ// +ãã«ãã¿ã°ã®ãããã§ãã©ãããã©ãŒã çšã«ã®ã¿ã³ã³ãã€ã«ãããŸãïŒã«ã¯ãåäžã®é¢æ°cgoAddrInfoFlagsïŒïŒã®å®è£ ãå«ãŸããŠããŸããããã¯ã次ã«dnsclient_unix.goã§äœ¿çšãããcgoLookupIPïŒïŒã§äœ¿çšãããŸãgoLookupIPïŒïŒé¢æ°ãèŠã€ããŸããããã¯ãcgo察å¿ã³ãŒãããªãå Žåã®ãã©ãŒã«ããã¯ãªãã·ã§ã³ãšããŠæ©èœãã説æãèŠã€ããŸãã
// goLookupIPã¯LookupIPã®ãã€ãã£ãGoå®è£ ã§ãã
// cgoLookupIPããªã¯ãšã¹ãã®åŠçãæåŠããå Žåã«ã®ã¿äœ¿çš
//ïŒã€ãŸããcgoLookupIPãcgo_stub.goã®ã¹ã¿ãã§ããå Žåã®ã¿ïŒã
//éåžžãcgoã«Cã©ã€ãã©ãªãªãŸã«ãã䜿çšãããŸã
//ã«ãã¯ã¢ããã³ãŒãã«å¿ããŠãGoãšCãåãã«ãªãããã«ããŸã
//çããŸãã
goLookupIPã¯ãå®éã«ã¯Hostsãã¡ã€ã«ãšDNSãããã³ã«ã§ã®ã¿è§£æ±ºããŸããããã¯ã»ãšãã©ã®ã·ã¹ãã ã§çŽã§ãã ãã ããã·ã¹ãã ã§ååã解決ããéæšæºã®æ¹æ³ã䜿çšãããŠããå Žåãåé¡ãçºçããå¯èœæ§ããããŸãã 99ïŒ ã®ã±ãŒã¹ã§ã¯ããã¹ããšDNSã§ååããããšæããŸãã
äžçªäžã®è¡ã¯-ã³ãŒããC / C ++ã䜿çšããªãå Žå-Cgoãä»ããã©ã€ãã©ãªã§ããã次ã®2ã€ã®ããšã䜿çšããŸããã
- MacOS Xã§åäœããx.509蚌ææžã®æ€èšŒ
- çŸåšã®ãŠãŒã¶ãŒã«é¢ããã·ã¹ãã æ å ±ã®åä¿¡ãä¿èšŒãããŠããŸã
ããããã° ãCgoã®ãã©ãã«ããã¹ãŠèšé²ã§ããŸã ã
æåã®éšåïŒX.509ããïŒã¯å®éã«ã¯ããã»ã©çãããããŸããã ç§ãæ£ããç解ããŠããå Žå-ããã°ã©ã ãæšæºã®net / http.StartAndListenTLSïŒïŒã䜿çšããŠããå Žåããã®ã³ãŒããå¿ èŠã§ã-ãããŠå®éã«æ€èšŒããå¿ èŠãããå®éã®èšŒææžã䜿çšããŸãã
ãããã£ãŠããã®ãããã¯ã«é¢ããç°¡åãªåé¿çã«ã€ããŠç°¡åã«èª¬æããŸã-gonativeãšåŒã°ãã1ã€ã®ç°¡åãªããš-ç®çã®ãã©ãããã©ãŒã ã®golangã®å ¬åŒããŒãžã§ã³ã®ãã€ããªããŒãžã§ã³ãããŠã³ããŒãããŸããããã«ã¯ããã¹ãŠã®æšæºããã±ãŒãžã®ã³ã³ãã€ã«æžã¿ãã€ããªãæ¢ã«ååšããå®éã«ã¯ãããŒã«ãã§ãŒã³ã®æ§ç¯ãããã»ã¹ãå®äºããŸãcgoã³ãŒãã§ãã
å¿ èŠãªã®ã¯ããããã€ã³ã¹ããŒã«ããŠïŒgithub.com/inconshreveable/gonativeãååŸïŒã1ã€ã®ç°¡åãªã³ãã³ããå®è¡ããããšã ãã§ãïŒ
gonative
ããã«ã以åãšåæ§ã«ããã³ãã«ã䜿çšãããgox / gocxã䜿çšããŠãæšæºã®ã¯ãã¹ã³ã³ãã€ã«æé ã䜿çšããŸãã
gonativeã«ã€ããŠè©³ããã¯ãinconshreveable.com / 04-30-2014 / cross-compiling-golang-programs-with-native-librariesãã芧ãã ããã
å®çšå
ããã§äž»ãªããšã«ã€ããŠ-ãããå®è·µããã ãããŸã§ã«æ¬çªç°å¢ã§äœ¿çšããã¹ããŒã ã¯ããdarwin / amd64ã§ãã«ã-> linux / 386ã«ãããã€ãããlinux / amd64-> linux / 386ãããlinux / amd64-> windows / amd64ãã®3ã€ã ãã§ãã ãããã¯ã1幎以äžå®å šã«æ©èœããŠãã補åã§ãã 3çªç®ã®ã±ãŒã¹ïŒWindowsã§ã®å±éïŒã¯ãäžè¬çã«é©ãããLinuxã§æ£åžžã«å®è¡ãããŠãããµãŒããŒãããããã®åŸçªç¶Windowsã§å®è¡ããå¿ èŠãçããã ããã«ããç·æ¥ã«å¿ èŠãã ã¯ãã¹ã§ã®ç ããªãå€ã®çµéšãèŠããŠããŸã-ã¯ããWindowsã§ã®å±éã®ããã®Qtã³ã³ãã€ã«ã ãã§äœããããŸãã-60ç§éã®ããã»ã¹ããããè¡ãæ¹æ³âããŒã«ãã§ãŒã³ãæ§ç¯âãããžã§ã¯ããåã³ã³ãã€ã«âWindowsã«å±éã-ã·ã§ãã¯ã§ããç§ã¯èªåã®ç®ãä¿¡ããããŸããã§ããã
ããããããã§æ¬¡ã®ç¬éãçºçããŸã-ã¯ãã¹ã³ã³ãã€ã«ãšå±éãéåžžã«ç°¡åãã€é«éã«ãªããããæ§æãã¡ã€ã«ã蚌ææžããã®ä»ã®ãã¡ã€ã«ã«äŸåããŠãã€ããªã«åã蟌ãã€ã³ã»ã³ãã£ãããããŸãã ãã ããããã¯io.Readerã€ã³ã¿ãŒãã§ã€ã¹ãšgo-bindataããã±ãŒãžã®å¹ççãªäœ¿çšã®ãããã§ããµãŒãããŒãã£ã®ã©ã€ãã©ãªã§ãããªãç°¡åãªã¿ã¹ã¯ã§ãããããã¯å¥ã®èšäºã®ãããã¯ã§ãã
äž»ãªãã®ãèŠéããŠããªãããšãé¡ã£ãŠããŸãã
ããããå šäœçã«ãããã¯å®éã«ã¯ä»¥åã®ãã¹ãŠã®ã¯ãã¹ãã«ãã®çµéšãšéåžžã«å€§ããªéãã§ãã æ£çŽã«èšããšãç§ã¯ãŸã ãã®å€æŽã«æ £ããŠããŸããã éçºç°å¢ãæ§æãããä»®æ³ãã·ã³ã¯äžèŠã«ãªããã¢ã»ã³ããªã«ããã«ãŒã€ã¡ãŒãžã¯äžèŠã«ãªããŸãããäžè¬çã«ãéçºç°å¢ã¯ãã®ãŸãŸã§ã¯æ¶ããŸããã ããã¯ã²ãŒã ãã§ã³ãžã£ãŒãšããŠã¯ããŸãã«ãéãããŠããã«æ £ããããšãã§ããŸããã
åç §è³æ
dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go
blog.hashbangbash.com/2014/04/linking-golang-statically
www.limitlessfx.com/cross-compile-golang-app-for-windows-from-linux.html