Add rust bindings for amdsmi c interface (#14)

It consists of two main steps:

1. Generating Bindings with `bindgen`:
- The `build.rs` script uses `bindgen` to generate Rust FFI (Foreign
Function Interface) bindings for the AMD SMI C library. This step
automatically exports all enums, structs, unions, and unsafe functions
from the C library into Rust. This provides a comprehensive low-level
interface to the AMD SMI library.

2. Implementing Safe Rust Wrappers:
- The generated bindings are then wrapped in safe Rust functions. These
safe wrappers handle error checking, resource management, and provide a
more idiomatic Rust interface. This ensures that users of the library
can interact with the AMD SMI functions without dealing with unsafe code
directly.

Change-Id: I7d5e49e59826164fc911ced04ef7ca5706b7cc05

Signed-off-by: Tim Huang <tim.huang@amd.com>
이 커밋은 다음에 포함됨:
Huang, Tim
2025-01-08 07:19:46 +08:00
커밋한 사람 GitHub
부모 3897670757
커밋 d32f2a109a
19개의 변경된 파일11542개의 추가작업 그리고 0개의 파일을 삭제
+4
파일 보기
@@ -0,0 +1,4 @@
# Auto generated by Carge
target
build
*.lock