diff --git a/.gitignore b/.gitignore index 78e294ce..9ecf5c78 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,8 @@ bindings/python/unicorn.egg-info/ bindings/python/unicorn/lib/ bindings/python/unicorn/include/ bindings/python/MANIFEST +bindings/rust/target/ +bindings/rust/Cargo.lock config.log diff --git a/bindings/rust/Cargo.toml b/bindings/rust/Cargo.toml index 6edc7875..d609fd03 100644 --- a/bindings/rust/Cargo.toml +++ b/bindings/rust/Cargo.toml @@ -19,9 +19,8 @@ build = "build.rs" links = "unicorn" [dependencies] -bitflags = "1.0" +bitflags = "1.3" libc = "0.2" -capstone="0.6.0" [build-dependencies] build-helper = "0.1" diff --git a/bindings/rust/src/arm64.rs b/bindings/rust/src/arm64.rs index 8b7c1254..523de02a 100644 --- a/bindings/rust/src/arm64.rs +++ b/bindings/rust/src/arm64.rs @@ -305,7 +305,6 @@ pub enum RegisterARM64 { VBAR_EL2 = 288, VBAR_EL3 = 289, ENDING = 290, - // alias registers // (assoc) IP0 = 215, // (assoc) IP1 = 216, diff --git a/bindings/rust/src/lib.rs b/bindings/rust/src/lib.rs index cc7f5641..8fb5ed3c 100644 --- a/bindings/rust/src/lib.rs +++ b/bindings/rust/src/lib.rs @@ -138,7 +138,6 @@ impl std::fmt::Debug for UnicornInner { } impl<'a> UnicornHandle<'a> { - /// Return the architecture of the current emulator. pub fn get_arch(&self) -> Arch { self.inner.arch diff --git a/bindings/rust/src/mips.rs b/bindings/rust/src/mips.rs index a1b590c6..84cec434 100644 --- a/bindings/rust/src/mips.rs +++ b/bindings/rust/src/mips.rs @@ -156,7 +156,6 @@ pub enum RegisterMIPS { CP0_CONFIG3 = 137, CP0_USERLOCAL = 138, ENDING = 139, - // alias registers // (assoc) ZERO = 2, // (assoc) AT = 3, diff --git a/bindings/rust/tests/unicorn.rs b/bindings/rust/tests/unicorn.rs index 203d3251..90021835 100644 --- a/bindings/rust/tests/unicorn.rs +++ b/bindings/rust/tests/unicorn.rs @@ -618,8 +618,8 @@ fn x86_context_save_and_restore() { let x86_code: Vec = vec![ 0x48, 0xB8, 0xEF, 0xBE, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x05, ]; - let mut unicorn = unicorn::Unicorn::new(Arch::X86, mode) - .expect("failed to initialize unicorn instance"); + let mut unicorn = + unicorn::Unicorn::new(Arch::X86, mode).expect("failed to initialize unicorn instance"); let mut emu = unicorn.borrow(); assert_eq!(emu.mem_map(0x1000, 0x4000, Permission::ALL), Ok(())); assert_eq!(emu.mem_write(0x1000, &x86_code), Ok(())); @@ -635,8 +635,8 @@ fn x86_context_save_and_restore() { let context = context.unwrap(); /* and create a new emulator, into which we will "restore" that context */ - let mut unicorn2 = unicorn::Unicorn::new(Arch::X86, mode) - .expect("failed to initialize unicorn instance"); + let mut unicorn2 = + unicorn::Unicorn::new(Arch::X86, mode).expect("failed to initialize unicorn instance"); let emu2 = unicorn2.borrow(); assert_eq!(emu2.context_restore(&context), Ok(())); for register in X86_REGISTERS.iter() {