# hw_dcmi_wrapper_sys
[](https://crates.io/crates/hw_dcmi_wrapper_sys)
[](https://crates.io/crates/hw_dcmi_wrapper_sys)
[](https://docs.rs/hw_dcmi_wrapper_sys)
[中文文档](./README_CN.md)
Rust bindings for the [DaVinci Card Management Interface][dcmi] (DCMI), a C-based programmatic
interface for monitoring and managing various states within Huawei NPUs.
It is intended to be a platform for building 3rd-party applications, and is also the
underlying library for Huawei's npu-smi tool.
See [`hw_dcmi_wrapper`][hw_dcmi_wrapper] for a safe wrapper over top of these bindings.
## About Bindings
These binding is generated by [bindgen], and you can obtain the binding of dynamic links by enabling the 'load_dynamic'
feature (via [`libloading`][libloading]). Otherwise, the binding of static links will be generated.
By default, the library searches for DCMI components in the `/usr/local/dcmi` directory.
You can override this path by setting the `HW_DCMI_PATH` environment variable.
If you want to regenerate bindings, you can set `HW_DCMI_BINDING_BUILD` to `true` to regenerate bindings,
the generated bindings will be saved in:
- Static link: `hw_dcmi_wrapper_sys/src/bindings.rs`
- Dynamic link: `hw_dcmi_wrapper_sys/src/bindings_dyn.rs`
#### License
Licensed under either of [Apache License, Version
2.0](../../LICENSE-APACHE") or [MIT license](../../LICENSE-MIT) at your option.
---
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.
[dcmi]: https://support.huawei.com/enterprise/zh/doc/EDOC1100349020/426cffd9
[hw_dcmi_wrapper]: https://github.com/ZhuLegend/hw_dcmi_wrapper
[bindgen]: https://github.com/rust-lang/rust-bindgen
[libloading]: https://github.com/nagisa/rust_libloading