Documentation
¶
Overview ¶
Package ecmaregex executes one checked ECMA-262 2020 Unicode regular expression guest in isolated WebAssembly instances. It is not the Refine language regular-expression engine.
Index ¶
- Constants
- func Artifact() []byte
- func DistributionManifest() []byte
- func DistributionNotice() []byte
- func IsFailure(err error, kind FailureKind) bool
- func UTF16(input string) ([]uint16, error)
- type Engine
- type Failure
- type FailureKind
- type Handle
- type InitLimits
- type Limits
- type Phase
- type Request
- func (r *Request) Close() error
- func (r *Request) Compile(input string) (Handle, error)
- func (r *Request) CompileUTF16(pattern []uint16) (handle Handle, failureResult error)
- func (r *Request) Release(handle Handle) error
- func (r *Request) Test(handle Handle, input string) (bool, error)
- func (r *Request) TestUTF16(handle Handle, subject []uint16) (matched bool, failureResult error)
Constants ¶
const ( ArtifactName = "refine-ecma262.wasm" ArtifactSHA256 = "ee1ff0212d3a3bd28a72f00033f51dad747c8b36e9302edbbbd35cf6a58bfe8f" ABIVersion uint32 = 2 HardMemoryPages uint32 = 512 HardPatternUnits = 16384 HardInputUnits = 1 << 20 HardHandles = 1024 HardEvaluations uint64 = 10000 HardWorkUnits uint64 = 8 << 20 HardPolls uint32 = 1000000 HardDuration = time.Second HardInitializationDuration = 10 * time.Second HardInitializationPolls uint32 = 1000000 HardSessions = 4 )
Variables ¶
This section is empty.
Functions ¶
func Artifact ¶
func Artifact() []byte
Artifact returns a defensive copy for generators that must emit the exact guest as a sibling resource rather than a Java source constant.
func DistributionManifest ¶
func DistributionManifest() []byte
DistributionManifest returns the checked guest build manifest.
func DistributionNotice ¶
func DistributionNotice() []byte
DistributionNotice returns the complete guest notices and license texts as a defensive copy suitable for a generated artifact.
func IsFailure ¶
func IsFailure(err error, kind FailureKind) bool
Types ¶
type Failure ¶
type Failure struct {
Kind FailureKind
Phase Phase
// contains filtered or unexported fields
}
Failure deliberately excludes pattern and subject text from Error().
type FailureKind ¶
type FailureKind string
const ( SyntaxFailure FailureKind = "syntax" ResourceFailure FailureKind = "resource" InternalFailure FailureKind = "internal" )
type InitLimits ¶
func DefaultInitLimits ¶
func DefaultInitLimits() InitLimits
type Limits ¶
type Limits struct {
MaxPatternUnits int
MaxInputUnits int
MaxHandles int
MaxEvaluations uint64
MaxWorkUnits uint64
MaxPolls uint32
MaxDuration time.Duration
MaxCompilationPolls uint32
MaxCompilationDuration time.Duration
}
func DefaultLimits ¶
func DefaultLimits() Limits
type Request ¶
type Request struct {
// contains filtered or unexported fields
}