cedar_policy/
lib.rs

1/*
2 * Copyright Cedar Contributors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// Includes the cedar-policy README as the top-level documentation for this
18// crate. This also acts as a test that the example code in the README
19// compiles. If changing the docs away from using the readme verbatim, be sure
20// to add a separate test specifically for README examples by introducing a
21// private, empty, and unused function with `#[doc = include_str!("../README.md")]`.
22#![doc = include_str!("../README.md")]
23#![warn(clippy::pedantic, clippy::use_self, clippy::option_if_let_else)]
24#![deny(
25    missing_docs,
26    rustdoc::broken_intra_doc_links,
27    rustdoc::private_intra_doc_links,
28    rustdoc::invalid_codeblock_attributes,
29    rustdoc::invalid_html_tags,
30    rustdoc::invalid_rust_codeblocks,
31    rustdoc::bare_urls,
32    clippy::doc_markdown,
33    clippy::doc_lazy_continuation,
34    clippy::too_long_first_doc_paragraph
35)]
36#![allow(clippy::must_use_candidate)]
37// enable doc_auto_cfg feature if docsrs cfg is present
38#![cfg_attr(docsrs, feature(doc_auto_cfg))]
39#![cfg_attr(feature = "wasm", allow(non_snake_case))]
40
41/// Rust public API
42mod api;
43
44pub use api::version::{get_lang_version, get_sdk_version};
45pub use api::*;
46
47/// FFI utilities, see comments in the module itself
48pub mod ffi;
49
50/// Protobuf models of cedar-policy types
51#[cfg(feature = "protobufs")]
52pub mod proto;
53
54mod prop_test_policy_set;
55mod tests;