build: download and compile with wasi-sdk

This commit is contained in:
Li Jie
2025-04-08 10:18:50 +08:00
parent e6c7627ee8
commit f35063ee6e
5 changed files with 346 additions and 2 deletions

8
internal/env/env.go vendored
View File

@@ -32,6 +32,14 @@ func GOROOT() string {
panic("cannot get GOROOT: " + err.Error())
}
func LLGoCacheDir() string {
userCacheDir, err := os.UserCacheDir()
if err != nil {
panic(err)
}
return filepath.Join(userCacheDir, "llgo")
}
func LLGoRuntimeDir() string {
root := LLGoROOT()
if root != "" {