borderless_runtime/
lib.rs1pub mod db;
2pub mod error;
3
4#[cfg(feature = "http")]
5pub mod http;
6
7mod rt;
8
9pub use error::{Error, Result};
10
11#[cfg(feature = "contracts")]
12pub use rt::contract::{
13 MutLock as ContractLock, Runtime as ContractRuntime, SharedRuntime as SharedContractRuntime,
14};
15
16#[cfg(feature = "agents")]
17pub use rt::agent::{
18 MutLock as AgentLock, Runtime as AgentRuntime, SharedRuntime as SharedAgentRuntime,
19};
20
21#[cfg(any(feature = "contracts", feature = "agents"))]
23pub use rt::*;
24
25pub const CONTRACT_SUB_DB: &str = "contract-db";
27
28pub const AGENT_SUB_DB: &str = "agent-db";
30
31pub const WASM_CODE_SUB_DB: &str = "wasm-code-db";
33
34pub const ACTION_TX_REL_SUB_DB: &str = "rel-tx-action-db";
36
37pub const SUBSCRIPTION_REL_SUB_DB: &str = "rel-subscription-db";
39
40pub const LEDGER_SUB_DB: &str = "ledger-db";
42
43mod log_shim {
47 #[cfg(all(feature = "tracing", not(feature = "log")))]
48 pub use tracing::{debug, error, info, trace, warn};
49
50 #[cfg(all(feature = "log", not(feature = "tracing")))]
51 pub use log::{debug, error, info, trace, warn};
52
53 #[cfg(any(
55 all(not(feature = "log"), not(feature = "tracing")),
56 all(feature = "log", feature = "tracing")
57 ))]
58 pub use crate::void as trace;
59
60 #[cfg(any(
61 all(not(feature = "log"), not(feature = "tracing")),
62 all(feature = "log", feature = "tracing")
63 ))]
64 pub use crate::void as debug;
65
66 #[cfg(any(
67 all(not(feature = "log"), not(feature = "tracing")),
68 all(feature = "log", feature = "tracing")
69 ))]
70 pub use crate::void as info;
71
72 #[cfg(any(
73 all(not(feature = "log"), not(feature = "tracing")),
74 all(feature = "log", feature = "tracing")
75 ))]
76 pub use crate::void as warn;
77
78 #[cfg(any(
79 all(not(feature = "log"), not(feature = "tracing")),
80 all(feature = "log", feature = "tracing")
81 ))]
82 pub use crate::void as error;
83
84 #[cfg(any(
85 all(not(feature = "log"), not(feature = "tracing")),
86 all(feature = "log", feature = "tracing")
87 ))]
88 #[macro_export]
89 macro_rules! void {
90 ($($t:tt)*) => {{
91 let _ = format_args!($($t)*);
92 }};
93 }
94
95 }