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
37mod log_shim {
41 #[cfg(all(feature = "tracing", not(feature = "log")))]
42 pub use tracing::{debug, error, info, trace, warn};
43
44 #[cfg(all(feature = "log", not(feature = "tracing")))]
45 pub use log::{debug, error, info, trace, warn};
46
47 #[cfg(any(
49 all(not(feature = "log"), not(feature = "tracing")),
50 all(feature = "log", feature = "tracing")
51 ))]
52 pub use crate::void as trace;
53
54 #[cfg(any(
55 all(not(feature = "log"), not(feature = "tracing")),
56 all(feature = "log", feature = "tracing")
57 ))]
58 pub use crate::void as debug;
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 info;
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 warn;
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 error;
77
78 #[cfg(any(
79 all(not(feature = "log"), not(feature = "tracing")),
80 all(feature = "log", feature = "tracing")
81 ))]
82 #[macro_export]
83 macro_rules! void {
84 ($($t:tt)*) => {{
85 let _ = format_args!($($t)*);
86 }};
87 }
88
89 }