cpufeat

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cpufeat is the CPU-features overlay: the set of optional instruction families (SSE/AVX/NEON/…) a binary requires, the baseline they imply, and how often each is used. Enter jumps to a feature's first use.

The scan that produces the set is analysis (internal/dump) and its async orchestration is the shell's, since only the shell owns the event loop. This package owns what the scan's result looks like and how it responds to input.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

State is the CPU-features overlay. The zero value is closed and empty.

func (*State) Activate

func (s *State) Activate(host modal.Host) tea.Cmd

Activate jumps to the first use of the selected feature and closes.

func (*State) Active

func (s *State) Active() bool

func (*State) ClickRow

func (s *State) ClickRow(listRow int) bool

ClickRow selects the feature on a clicked content row. Rows map 1:1 to features, so the shared helper does it.

func (*State) Close

func (s *State) Close()

func (*State) Features

func (s *State) Features() []string

Features returns the feature names in display order.

func (*State) List

func (s *State) List() (sel *int, top, n int, wrap, ok bool)

List exposes the feature list to the shell's shared mouse handling. Selection does not wrap: this is a flat list, not a settings cycle.

func (*State) ListRow

func (s *State) ListRow() int

func (*State) Open

func (s *State) Open(set dump.CPUFeatureSet)

Open shows the overlay for a scan result and marks it cached.

func (*State) Render

func (s *State) Render(ctx modal.Context) string

func (*State) Scanned

func (s *State) Scanned() bool

Scanned reports whether a completed scan is cached, so the shell can reopen the overlay without rescanning.

func (*State) Set

func (s *State) Set() dump.CPUFeatureSet

Set returns the cached scan result.

func (*State) Update

func (s *State) Update(ctx modal.Context, host modal.Host, key string) tea.Cmd

Update handles one keypress.

Jump to

Keyboard shortcuts

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