Skip to content

Commit

Permalink
Remove syscall_stdio feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Jul 8, 2024
1 parent 03612ee commit f13b3ae
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build
- name: Build ckb-vm-signal-profiler example
run: cargo build --examples --package ckb-vm-signal-profiler

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build
- name: Build ckb-vm-signal-profiler example
run: cargo build --examples --package ckb-vm-signal-profiler
3 changes: 1 addition & 2 deletions ckb-debugger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2021"

[features]
default = []
syscall_stdio = ["nix"]

[dependencies]
addr2line = "0.17"
Expand All @@ -29,7 +28,7 @@ goblin = "0.4"
hex = "0.4"
libc = "0.2.132"
log = "0.4.0"
nix = { version = "0.26.2", optional = true }
nix = "0.26.2"
probe = "0.5"
rand = "0.8.5"
regex = "1"
Expand Down
4 changes: 2 additions & 2 deletions ckb-debugger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod machine_gdb;
mod misc;
mod syscall_all;
mod syscall_elf_dumper;
#[cfg(feature = "syscall_stdio")]
#[cfg(target_family = "unix")]
mod syscall_stdio;

pub use machine_analyzer::{MachineAnalyzer, MachineOverlap, MachineProfile, MachineStepLog};
Expand All @@ -13,5 +13,5 @@ pub use machine_gdb::{GdbStubHandler, GdbStubHandlerEventLoop};
pub use misc::{get_script_hash_by_index, pre_check, DummyResourceLoader, Embed, HumanReadableCycles};
pub use syscall_all::{FileOperation, FileStream, Random, TimeNow};
pub use syscall_elf_dumper::ElfDumper;
#[cfg(feature = "syscall_stdio")]
#[cfg(target_family = "unix")]
pub use syscall_stdio::Stdio;
4 changes: 2 additions & 2 deletions ckb-debugger/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ckb_chain_spec::consensus::ConsensusBuilder;
#[cfg(feature = "syscall_stdio")]
#[cfg(target_family = "unix")]
use ckb_debugger::Stdio;
use ckb_debugger::{
get_script_hash_by_index, pre_check, DummyResourceLoader, ElfDumper, FileOperation, FileStream,
Expand Down Expand Up @@ -376,7 +376,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
machine_assign.expand_syscalls.push(Box::new(FileStream::new(name)));
}
machine_assign.expand_syscalls.push(Box::new(Random::new()));
#[cfg(feature = "syscall_stdio")]
#[cfg(target_family = "unix")]
machine_assign.expand_syscalls.push(Box::new(Stdio::new(false)));
machine_assign.expand_syscalls.push(Box::new(TimeNow::new()));
machine_assign.wait()?;
Expand Down

0 comments on commit f13b3ae

Please sign in to comment.