(jsrt) opt. & fix: cfg loading

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-07-15 22:50:38 +08:00
parent fd51f71e0f
commit 4c72f2abed
5 changed files with 19 additions and 14 deletions

View File

@@ -28,7 +28,7 @@ const (
defaultMaxVMCount = 8
)
func init() {
func loadCfg() {
if enabled := os.Getenv("JS_RUNTIME_ENABLED"); enabled != "" {
jsConfig.Enabled = enabled == "true"
}