aic-sdk = "=0.24.0". Core SDK: 0.24.0. The minimum Rust version is 1.88, using edition 2024. Source: the published aic-sdk and aic-sdk-sys crates.
Cargo features
No features are enabled by default. Static native linking is the default strategy, but a native library must still be supplied. Cargo features are additive across dependencies.
If both linking features are enabled, runtime linking wins and the build emits a warning. Prefer selecting one explicitly.
AIC_LIB_PATH identifies the SDK library directory for static/dynamic build-time linking; it is not the runtime load_library file path. With no download feature, build-time linking requires a local library. See the released linking guide for platform deployment details.
For runtime loading and async processing, a minimal dependency declaration is:
load_library
Requires feature:runtime-linking.
AlreadyLoaded; the implementation attempts opening and resolving the supplied library before storing it, so an invalid subsequent path can return an open/symbol error first.
If you omit this call, the first SDK operation loads the platform default filename through the OS loader search path (libaic.so, libaic.dylib or aic.dll). Automatic loading failure panics. Explicit loading lets you handle DynamicLoadingError before SDK use.
is_library_loaded
Requires feature:runtime-linking.
DynamicLoadingError
Requires feature:runtime-linking. Reexported from aic_sdk_sys.
All named variant fields are public pattern-match payloads with the types shown above.
path identifies the attempted file and symbol the missing native function. Both source fields preserve the platform loader error. The enum implements Debug, Display and std::error::Error; Error::source() returns the underlying loader error for the two payload variants and None for AlreadyLoaded. It is not Clone or Eq.
AicError
Debug, Clone, PartialEq, Eq, Display and std::error::Error. Display provides diagnostic text; match variants rather than parsing those strings. ModelDownload carries text rather than a nested error source.
The tuple payloads are available through pattern matching.
ModelDownload exists even with download-model disabled, although the public downloader is then absent. There is no ParameterFixed variant in this release.
Panics and Result boundaries
Result covers ordinary native errors but is not a promise that no call can panic. Model/query/context functions assert native success. Model::from_file panics on an embedded NUL path. Worker initialization or unexpected worker channel loss can panic in async code. Runtime automatic loading can panic before the called SDK operation returns. Explicit loader handling and validated inputs keep these conditions distinct from routine processing errors.
Trait and conversion surface
Explicit conversions are:
Unknown; the null-pointer error code panics as a wrapper invariant failure. Do not convert a native success code into an error: this conversion does not perform the success check used by fallible SDK methods. Naming the aic_sdk_sys types in application code requires that crate as a direct dependency; they are not root type reexports of aic_sdk.
Rustdoc also lists standard blanket traits and other compiler-derived implementations.