1#![allow(
32 non_camel_case_types,
33 non_snake_case,
34 non_upper_case_globals,
35 clippy::doc_markdown,
36 clippy::doc_lazy_continuation,
37 clippy::pub_underscore_fields,
38 clippy::unreadable_literal,
39 clippy::too_many_arguments,
40 clippy::struct_field_names,
41 clippy::missing_safety_doc,
42 rustdoc::invalid_html_tags
43)]
44
45#[cfg(all(target_os = "windows", target_arch = "x86_64", target_env = "msvc"))]
46#[path = "generated/x86_64_pc_windows_msvc/types.rs"]
47mod types;
48#[cfg(all(target_os = "windows", target_arch = "x86_64", target_env = "msvc"))]
49#[macro_use]
50#[path = "generated/x86_64_pc_windows_msvc/functions.rs"]
51mod function_list;
52
53#[cfg(all(target_os = "linux", target_arch = "x86_64", target_env = "gnu"))]
54#[path = "generated/x86_64_unknown_linux_gnu/types.rs"]
55mod types;
56#[cfg(all(target_os = "linux", target_arch = "x86_64", target_env = "gnu"))]
57#[macro_use]
58#[path = "generated/x86_64_unknown_linux_gnu/functions.rs"]
59mod function_list;
60
61#[cfg(target_os = "macos")]
62#[path = "generated/aarch64_apple_darwin/types.rs"]
63mod types;
64#[cfg(target_os = "macos")]
65#[macro_use]
66#[path = "generated/aarch64_apple_darwin/functions.rs"]
67mod function_list;
68
69#[cfg(not(any(
70 all(target_os = "windows", target_arch = "x86_64", target_env = "msvc"),
71 all(target_os = "linux", target_arch = "x86_64", target_env = "gnu"),
72 target_os = "macos"
73)))]
74compile_error!(
75 "qaros-sys has no committed bindings for this target; run `cargo xtask bindgen <target>` and add it to src/lib.rs"
76);
77
78pub mod defaults;
79mod loader;
80mod lookup;
81mod platform;
82
83pub use loader::{LoadError, QarApi, SYMBOL_NAMES, open_package_library};
84pub use lookup::{
85 DEFAULT_INSTANCE_NAME, INSTALL_FOLDER_VALUE, INSTALL_REGISTRY_KEY, INSTANCE_NAME_MAX_LENGTH,
86 INSTANCE_RUNTIME_FOLDER_VALUE, INSTANCE_VARIABLE, INSTANCES_REGISTRY_KEY, LookupAttempt,
87 LookupOutcome, LookupStep, is_valid_instance_name,
88};
89pub use platform::{installed_bin_folder, instance_runtime_folder, requested_instance};
90pub use types::*;
91
92pub const LIBRARY_FILE_NAME: &str = if cfg!(target_os = "windows") {
94 "qar-streaming-c.dll"
95} else if cfg!(target_os = "macos") {
96 "libqar-streaming-c.dylib"
97} else {
98 "libqar-streaming-c.so"
99};