analyzerrust

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 10 Imported by: 0

Documentation

Overview

Package analyzerrust is an isolated, static-only Rust fact candidate. It consumes exactly one canonical JSON/LF request frame of caller-owned bytes and emits exactly one canonical JSON/LF frame. It never opens a repository or ambient file, reads PATH/HOME/CWD or the environment, invokes cargo, rustc, a process, or a shell, uses a network or dynamic loader, or asserts that any input compiles.

The family is a separately specified experimental family under docs/specs/analyzer-candidate-profiles.md; it reuses the generic transport profile, the generic eight-field fact shape, and the frozen fourteen-field evidence digest verbatim, so it alters no existing family bytes.

Index

Constants

View Source
const (
	Profile                 = "corvint-analyzer-candidate/experimental"
	Family                  = "rust"
	CEMOCMState             = "UNSUPPORTED"
	MaxRequestBytes         = 1_500_000
	MaxInputBytes           = 1 << 20
	MaxOutputBytes          = 1 << 20
	MaxInputs               = 128
	MaxFeatures             = 64
	MaxAggregateBase64Bytes = 1_398_104
	MaxJSONDepth            = 8
	MaxJSONTokens           = 4096
	MaxFactFieldBytes       = 4096
	MaxFacts                = 4096
	MaxIdentifierBytes      = 128
	MaxPathBytes            = 4096
	MaxPathSegmentBytes     = 128
	MaxSourceBytes          = 262_144
	MaxManifestBytes        = 65_536
	MaxManifestRows         = 8_192
	MaxNestingDepth         = 64
	MaxRawStringHashes      = 255
	MaxSourceTokens         = 262_144
)

Variables

This section is empty.

Functions

func AnalyzeCanonical

func AnalyzeCanonical(raw []byte) []byte

AnalyzeCanonical is pure: every byte it uses is reachable from raw.

Types

type Echo

type Echo struct {
	Handle string `json:"handle"`
	SHA256 string `json:"sha256"`
}

type Fact

type Fact struct {
	Kind           string `json:"kind"`
	InputHandle    string `json:"input_handle"`
	RelatedHandle  string `json:"related_handle"`
	Subject        string `json:"subject"`
	Predicate      string `json:"predicate"`
	Value          string `json:"value"`
	InstanceID     string `json:"instance_id"`
	EvidenceSHA256 string `json:"evidence_sha256"`
}

type Input

type Input struct {
	Handle        string `json:"handle"`
	Family        string `json:"family"`
	Path          string `json:"path"`
	SHA256        string `json:"sha256"`
	ContentBase64 string `json:"content_base64"`
}

type Request

type Request struct {
	Profile           string  `json:"profile"`
	Family            string  `json:"family"`
	RequestID         string  `json:"request_id"`
	ScopeID           string  `json:"scope_id"`
	CompilationUnitID string  `json:"compilation_unit_id"`
	Target            Target  `json:"target"`
	Inputs            []Input `json:"inputs"`
}

type Target

type Target struct {
	OS           string   `json:"os"`
	Architecture string   `json:"architecture"`
	ABI          string   `json:"abi"`
	Features     []string `json:"features"`
}

Jump to

Keyboard shortcuts

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