Documentation
// Copyright (c) 2026, Salesforce, Inc.,
// All rights reserved.
// For full license text, see the LICENSE.txt file

//! PDK Core
//!
//! This crate contains functionality that is specific for Flex Gateway.
//! It does not apply for all proxy_wasm hosts.

pub use classy;
pub(crate) use classy::DefaultHost as Host;
pub(crate) use classy::Host as HostTrait;
pub use pdk_macros::entrypoint;

pub use crate::log as logger;

mod middleware;

#[allow(dead_code)]
mod bindings;
pub mod client;
pub mod host;
pub mod init;
pub mod log;
pub mod policy_context;

// Available under the legacy `--cfg fips` build flag (workspace-wide FIPS build,
// still used by contracts-lib) or the Cargo `fips` feature (opted into by
// pdk-jwt-lib's feature-based fips backend, which must build without RUSTFLAGS).
#[cfg(any(fips, feature = "fips"))]
pub mod ffi {
    pub use protobuf::Error as ProtobufError;
    pub use protobuf::Message;

    mod private {
        include!(concat!(env!("OUT_DIR"), "/protos/mod.rs"));
    }

    // Explicit re-exports (not globs): each generated proto module also defines
    // a `file_descriptor()` fn, so globbing all three collides on that name.
    pub use private::get_sha_digest::{GetShaDigestArguments, GetShaDigestResult};
    pub use private::sign::{SignArguments, SignResult};
    pub use private::verify_signature::{VerifySignatureArguments, VerifySignatureResult};
}