mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
feat: 编译管线/类型层 crate 补全多级日志宏 + 关键路径日志
This commit is contained in:
@@ -7,3 +7,4 @@ rust-version.workspace = true
|
||||
description = "OxideJS - Shared bytecode protocol and compiled module ABI"
|
||||
|
||||
[dependencies]
|
||||
oxide_log = { path = "../oxide_log" }
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//! bytecode 日志宏:`bytecode_error!/warn!/info!/debug!/trace!`,经由 oxide_log 上报。
|
||||
//! 编译管线属 Kernel 子系统,`OXIDE_LOG=oxide::kernel=debug` 控制本 crate 日志。
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bytecode_error {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::ERROR, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bytecode_warn {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::WARN, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bytecode_info {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::INFO, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bytecode_debug {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::DEBUG, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bytecode_trace {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::TRACE, $($arg)*)
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
#![doc = "OxideJS - Shared bytecode protocol and compiled module ABI"]
|
||||
|
||||
/// bytecode 日志宏(`bytecode_error`/`bytecode_info` 等),target 为 `oxide::kernel`。
|
||||
mod bytecode_log;
|
||||
|
||||
/// 编译产物与常量池 ABI([`CompiledModule`] / [`Constant`])。
|
||||
pub mod module;
|
||||
/// 操作码表与指令编解码([`OpCode`] / [`Instr`])。
|
||||
|
||||
Reference in New Issue
Block a user