Skip to content

Info Method ​

After initializing the VM, you can retrieve metadata, system versions, and update statuses without needing to run any execution cycles.

Using TypeScript ​

For TypeScript, you can call the info method directly on the VM instance to fetch current version details and check for pending updates asynchronously.

ts
import { LightVM } from 'lightvm';

const vm = new LightVM({ caps: [] });

console.log(vm.info());

Using Rust ​

In Rust, you can query the initialized VM instance to inspect current runtime versions and update availability by calling the .info() method, which returns an InfoVM struct.

rust
use lightvm::LightVM;
use lightvm::types::{vmconfig::VmConfig};

fn main() {
  let mut vm = LightVM::new(VmConfig {
    caps: vec![],
    ..Default::default()
  });

  println!("{}", vm.info());
}

INFO

Capability Required: no specific capability