1pub mod context;
41pub mod deobfuscator;
42pub mod error;
43#[cfg(feature = "format")]
44pub mod format;
45pub mod options;
46pub mod scope;
47pub mod transformers;
48mod visitor;
49mod words;
50
51#[cfg(feature = "wasm")]
52pub mod wasm;
53#[cfg(feature = "wasm")]
54pub mod wasm_logger;
55
56pub use context::Context;
57pub use deobfuscator::{DeobfuscateOptions, Deobfuscator, SourceType};
58pub use error::{DeobfuscateError, Result};
59
60#[cfg(feature = "wasm")]
62macro_rules! log_info {
63 ($($arg:tt)*) => {
64 crate::wasm_logger::log(
65 crate::wasm_logger::LogLevel::Info,
66 &format!($($arg)*),
67 )
68 }
69}
70
71#[cfg(all(not(feature = "wasm"), feature = "tracing"))]
72macro_rules! log_info {
73 ($($arg:tt)*) => { tracing::info!($($arg)*) }
74}
75
76#[cfg(all(not(feature = "wasm"), not(feature = "tracing")))]
77macro_rules! log_info {
78 ($($arg:tt)*) => {{
79 let _: ::std::fmt::Arguments<'_> = ::std::format_args!($($arg)*);
80 }};
81}
82
83#[cfg(feature = "wasm")]
84macro_rules! log_debug {
85 ($($arg:tt)*) => {
86 crate::wasm_logger::log(
87 crate::wasm_logger::LogLevel::Debug,
88 &format!($($arg)*),
89 )
90 }
91}
92
93#[cfg(all(not(feature = "wasm"), feature = "tracing"))]
94macro_rules! log_debug {
95 ($($arg:tt)*) => { tracing::debug!($($arg)*) }
96}
97
98#[cfg(all(not(feature = "wasm"), not(feature = "tracing")))]
99macro_rules! log_debug {
100 ($($arg:tt)*) => {{
101 let _: ::std::fmt::Arguments<'_> = ::std::format_args!($($arg)*);
102 }};
103}
104
105pub(crate) use log_debug;
106pub(crate) use log_info;