Skip to content

kbkpbot/cpuinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description:

cpuinfo is a vlang module of retrieve CPU info. Currently, it support x86 & arm64 processor.

Usage:

  v install --git https://github.com/kbkpbot/cpuinfo

Then, in your code, import it.

import cpuinfo

fn main() {
  mut cpu := cpuinfo.detect_x86()
  println(cpu)
  assert cpu.has(.fpu, .sse, .sse2, .sse3, .aes)	// `has` at least one of the request features
  assert cpu.all(.fpu, .sse, .sse2)  // should have `all` the request features
}

Also, you can use the cpuinfo.CPUInfo_X86 or cpuinfo.CPUInfo_ARM64 directly.

About

A cpu info library in vlang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages