hostcap

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 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 hostcap reports what the host a build runs on can do beyond the language itself, so a capability that is not there is named rather than failing obscurely.

Index

Constants

This section is empty.

Variables

View Source
var ErrSpawnUnsupported = errors.New("a WebAssembly build cannot start external processes")

ErrSpawnUnsupported is the cause every external-process operation reports on a host that can start no process: every Go WebAssembly target (GOOS=js and GOOS=wasip1, both GOARCH=wasm). Callers reach it through errors.Is, wrapped into whichever typed error their layer answers with.

Functions

func CheckSpawn

func CheckSpawn(string) error

CheckSpawn returns nil: every native host starts processes, so nothing is refused here and every caller goes on to look the tool up and run it as it always has.

Types

type UnsupportedError

type UnsupportedError struct {
	// Subject is what was to run: a solver, an engine's executable, a compiler.
	Subject string
}

UnsupportedError names what cannot run on this host.

func (*UnsupportedError) Error

func (e *UnsupportedError) Error() string

Error names the subject and the cause it cannot run for.

func (*UnsupportedError) Unwrap

func (e *UnsupportedError) Unwrap() error

Unwrap returns ErrSpawnUnsupported.

Jump to

Keyboard shortcuts

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