diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-08-25 14:55:17 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-08-25 14:55:17 +0900 |
| commit | 18ba73c9571f4dbf07a14c980c4bb86d234fa136 (patch) | |
| tree | 41f9c5a0955d986bc9c3fbeda660be6cc35ec677 /internal/rosa/rosa.go | |
| parent | 1c3761bb53c95d75751f95e8f77d9d1e5928b968 (diff) | |
internal/rosa: optionally load built-ins from filesystem
This avoids having to rebuild cmd/mbf over and over.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/rosa.go')
| -rw-r--r-- | internal/rosa/rosa.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go index 1089ffa1..2a7cd777 100644 --- a/internal/rosa/rosa.go +++ b/internal/rosa/rosa.go @@ -2,14 +2,11 @@ package rosa import ( - "embed" - "io/fs" "os" "slices" "strconv" "strings" "sync" - "time" "unsafe" "hakurei.app/fhs" @@ -623,28 +620,3 @@ func (attr *GenericHelper) script(t Toolchain, _ string) string { script += attr.Install return script } - -// parseTime is the duration of early parsing of built-in azalea expressions. -var parseTime time.Duration - -// ParseTime returns the time taken by early parsing of built-in azalea expressions. -func ParseTime() time.Duration { return parseTime } - -// builtinAzalea is the backing directory of built-in azalea-based [Artifact] -// implementations. -// -//go:embed package -var builtinAzalea embed.FS - -func init() { - sub, err := fs.Sub(builtinAzalea, "package") - if err != nil { - panic(err) - } - t := time.Now() - if err = builtin.RegisterFS(sub); err != nil { - println(err.Error()) - os.Exit(1) - } - parseTime = time.Since(t) -} |
