evmstd

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: 0BSD Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package evmstd offers general-purpose Go standard packages to scripts, beyond the few the VM implements itself. Pass Packages to the compiler and the linker together with the host's own packages:

module, err := evmcompiler.Compile("plugin.go", source, evmstd.Packages()...)
program, err := evm.Link(module, evmstd.Packages()...)

GoX includes them without being asked.

Nothing here reads files, the network, the environment or the operating system. API.md lists what each package exposes and what it leaves out. Most native functions run outside the VM's instruction and allocation budgets, charging only the values they return. bytes.Replace, bytes.ReplaceAll, bytes.Join, and bytes.Repeat charge their output size before allocating (bytes.Repeat also caps output at 16 MiB). The six regexp.Regexp ReplaceAll methods (literal: ReplaceAllLiteral, ReplaceAllLiteralString; capture expansion: ReplaceAll, ReplaceAllString; callback: ReplaceAllFunc, ReplaceAllStringFunc) charge their output against the VM allocation budget. Source packages (cmp, iter, maps, slices, sort) are metered like script code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcurrencyPackages

func ConcurrencyPackages() []evm.Package

ConcurrencyPackages exposes the cache and its native bindings without the rest of evmstd. Packages already includes these declarations.

func Imports

func Imports() map[string]*evmbind.Schema

Imports returns the schemas of the natively bound packages by import path, for evmbind.Options.Imports. A host API that uses time.Duration or *url.URL then shares those types with scripts.

func Packages

func Packages() []evm.Package

Packages returns the standard packages for Compile and Link. The slice is the caller's to append to.

func Paths

func Paths() []string

Paths lists the import paths Packages provides, sorted.

Types

This section is empty.

Directories

Path Synopsis
_decl
internal
cachecore
Package cachecore binds the guest cache to its host-owned storage.
Package cachecore binds the guest cache to its host-owned storage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL