Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Update debug macro doc with latest usage in release build #66

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
/// Output a debug message.
///
/// This macro only compiled under debug build and does nothing in release build. To debug the release build,
/// append the `--cfg debug_assertions` arguments to `cargo build`. For users of Capsule, the debug macro can
/// be enabled in the release build by running `capsule build --release --debug-output`.
/// include `--cfg debug_assertions` in the environment variable `RUSTFLAGS` before calling `cargo build`.
/// For example:
///
/// ```
/// RUSTFLAGS="--cfg debug_assertions" cargo build --release --target=riscv64imac-unknown-none-elf
/// ```
///
/// For users of Capsule, the debug macro can be enabled in the release build by running
/// `capsule build --release --debug-output`.
///
/// Notice: to see the debug output, you must turn on `ckb_script` debugging log in the CKB node configuration
/// like this:
Expand Down