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 ¶
- type State
- func (s *State) Activate(host modal.Host) tea.Cmd
- func (s *State) Active() bool
- func (s *State) ClickRow(listRow int) bool
- func (s *State) Close()
- func (s *State) Features() []string
- func (s *State) List() (sel *int, top, n int, wrap, ok bool)
- func (s *State) ListRow() int
- func (s *State) Open(set dump.CPUFeatureSet)
- func (s *State) Render(ctx modal.Context) string
- func (s *State) Scanned() bool
- func (s *State) Set() dump.CPUFeatureSet
- func (s *State) Update(ctx modal.Context, host modal.Host, key string) tea.Cmd
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) ClickRow ¶
ClickRow selects the feature on a clicked content row. Rows map 1:1 to features, so the shared helper does it.
func (*State) List ¶
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) Open ¶
func (s *State) Open(set dump.CPUFeatureSet)
Open shows the overlay for a scan result and marks it cached.