How to get bios version

Hey guys, I am beginner and I am struggling a lot. I would be so grateful if someone could help me. I am trying go get the bios information on Win10 machine, something like if you use this command: Get-WmiObject win32_bios in powershell. I tried something with winapi and windows crates, but I was not able to write anything that works.....

Thanks to you all

I think you probably want to use the wmi crate.

You'll want to create a wmi connection, and then fetch the Win32_BIOS struct, in which there is a Version field.