quest_sys/lib.rs
1// Copyright © 2021 HQS Quantum Simulations GmbH. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
4// in compliance with the License. You may obtain a copy of the License at
5//
6// http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software distributed under the
9// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
10// express or implied. See the License for the specific language governing permissions and
11// limitations under the License.
12
13//! # quest-sys
14//!
15//! Rust bindings for the QuEST quantum computer simulator library.
16//!
17//! Conforming with the sys crate naming convention this package only provides very thin bindings.
18#![allow(non_camel_case_types)]
19#![allow(non_upper_case_globals)]
20#![allow(non_snake_case)]
21#![cfg_attr(test, allow(deref_nullptr))]
22
23#[cfg(feature = "rebuild")]
24use std::env;
25#[cfg(feature = "openmp")]
26extern crate openmp_sys;
27
28#[doc(hidden)]
29#[allow(clippy::doc_overindented_list_items)]
30mod bindings {
31 use std::include;
32
33 #[cfg(feature = "rebuild")]
34 include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
35
36 #[cfg(not(feature = "rebuild"))]
37 include!("bindings.rs");
38}
39
40// Re-export all items so paths remain as before (crate root).
41pub use bindings::*;