1
0
Fork 0

Ability to enable unsafe in yaegi through plugin manifest

This commit is contained in:
Ryan Melendez 2025-04-25 05:26:04 -04:00 committed by GitHub
parent a092c4f535
commit 8f37c8f0c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 45 additions and 10 deletions

View file

@ -11,8 +11,9 @@ const (
)
type Settings struct {
Envs []string `description:"Environment variables to forward to the wasm guest." json:"envs,omitempty" toml:"envs,omitempty" yaml:"envs,omitempty"`
Mounts []string `description:"Directory to mount to the wasm guest." json:"mounts,omitempty" toml:"mounts,omitempty" yaml:"mounts,omitempty"`
Envs []string `description:"Environment variables to forward to the wasm guest." json:"envs,omitempty" toml:"envs,omitempty" yaml:"envs,omitempty"`
Mounts []string `description:"Directory to mount to the wasm guest." json:"mounts,omitempty" toml:"mounts,omitempty" yaml:"mounts,omitempty"`
UseUnsafe bool `description:"Allow the plugin to use unsafe package." json:"useUnsafe,omitempty" toml:"useUnsafe,omitempty" yaml:"useUnsafe,omitempty"`
}
// Descriptor The static part of a plugin configuration.
@ -46,6 +47,7 @@ type Manifest struct {
BasePkg string `yaml:"basePkg"`
Compatibility string `yaml:"compatibility"`
Summary string `yaml:"summary"`
UseUnsafe bool `yaml:"useUnsafe"`
TestData map[string]interface{} `yaml:"testData"`
}