[chore] Remove unused "env" module (#3235)

This commit is contained in:
tobi 2024-08-25 17:37:20 +02:00 committed by GitHub
parent 2bd31ab710
commit db59ca36b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -180,17 +180,8 @@ func initRuntime(ctx context.Context) error {
// Instantiate runtime with prepared config. // Instantiate runtime with prepared config.
rt := wazero.NewRuntimeWithConfig(ctx, cfg) rt := wazero.NewRuntimeWithConfig(ctx, cfg)
// Prepare default "env" host module. // Instantiate wasi snapshot preview features into runtime.
env := rt.NewHostModuleBuilder("env") _, err := wasi_snapshot_preview1.Instantiate(ctx, rt)
// Instantiate host "env" module.
_, err := env.Instantiate(ctx)
if err != nil {
return err
}
// Instantiate wasi snapshot preview features in runtime.
_, err = wasi_snapshot_preview1.Instantiate(ctx, rt)
if err != nil { if err != nil {
return err return err
} }