Skip to content

Commit

Permalink
Fix bug when contract not has features: native-simulatorg (#129)
Browse files Browse the repository at this point in the history
* Fix bug when contract not has features: native-simulatorg
  • Loading branch information
joii2020 authored Jan 26, 2025
1 parent 5f8755a commit 22d33f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions contracts/exec-callee/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use core::result::Result;
// https://nervosnetwork.github.io/ckb-std/riscv64imac-unknown-none-elf/doc/ckb_std/index.html

use crate::error::Error;
extern crate alloc;

pub fn main() -> Result<(), Error> {
let argv = ckb_std::env::argv();
Expand Down
8 changes: 2 additions & 6 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@
#[macro_export]
macro_rules! debug {
($fmt:literal) => {
#[cfg(all(debug_assertions, feature = "native-simulator"))]
$crate::syscalls::debug(format!($fmt));
#[cfg(all(debug_assertions, not(feature = "native-simulator")))]
#[cfg(debug_assertions)]
$crate::syscalls::debug(alloc::format!($fmt));
};
($fmt:literal, $($args:expr),+) => {
#[cfg(all(debug_assertions, feature = "native-simulator"))]
$crate::syscalls::debug(format!($fmt, $($args), +));
#[cfg(all(debug_assertions, not(feature = "native-simulator")))]
#[cfg(debug_assertions)]
$crate::syscalls::debug(alloc::format!($fmt, $($args), +));
};
}

0 comments on commit 22d33f8

Please sign in to comment.