From addea1efa0e4e3be8251b70a690f1675e38acd6f Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Mon, 24 Jun 2019 22:02:00 +0300 Subject: [PATCH] Merge both packages --- Cargo.toml | 12 ++++++++---- arm7tdmi/Cargo.toml | 15 --------------- {arm7tdmi/src => src/arm7tdmi}/arm/arm_isa.rs | 0 {arm7tdmi/src => src/arm7tdmi}/arm/display.rs | 0 {arm7tdmi/src => src/arm7tdmi}/arm/mod.rs | 0 arm7tdmi/src/lib.rs => src/arm7tdmi/mod.rs | 7 +------ {arm7tdmi/src => src}/disass.rs | 11 ++++++++--- 7 files changed, 17 insertions(+), 28 deletions(-) delete mode 100644 arm7tdmi/Cargo.toml rename {arm7tdmi/src => src/arm7tdmi}/arm/arm_isa.rs (100%) rename {arm7tdmi/src => src/arm7tdmi}/arm/display.rs (100%) rename {arm7tdmi/src => src/arm7tdmi}/arm/mod.rs (100%) rename arm7tdmi/src/lib.rs => src/arm7tdmi/mod.rs (78%) rename {arm7tdmi/src => src}/disass.rs (91%) diff --git a/Cargo.toml b/Cargo.toml index 9c40408..89e0b33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,9 +4,13 @@ version = "0.1.0" authors = ["Michel Heily "] edition = "2018" -[workspace] -members = [".", "arm7tdmi"] - [dependencies] byteorder = "*" -arm7tdmi = {path = "arm7tdmi"} +enum-primitive-derive = "^0.1" +num-traits = "^0.1" +bit = "^0.1" +clap = {version = "2.33", features = ["color", "yaml"]} + +[[bin]] +name = "disass" +path = "src/disass.rs" \ No newline at end of file diff --git a/arm7tdmi/Cargo.toml b/arm7tdmi/Cargo.toml deleted file mode 100644 index 4e7d160..0000000 --- a/arm7tdmi/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "arm7tdmi" -version = "0.1.0" -authors = ["Michel Heily "] -edition = "2018" - -[dependencies] -byteorder = "*" -enum-primitive-derive = "^0.1" -num-traits = "^0.1" -bit = "^0.1" - -[[bin]] -name = "disass" -path = "src/disass.rs" \ No newline at end of file diff --git a/arm7tdmi/src/arm/arm_isa.rs b/src/arm7tdmi/arm/arm_isa.rs similarity index 100% rename from arm7tdmi/src/arm/arm_isa.rs rename to src/arm7tdmi/arm/arm_isa.rs diff --git a/arm7tdmi/src/arm/display.rs b/src/arm7tdmi/arm/display.rs similarity index 100% rename from arm7tdmi/src/arm/display.rs rename to src/arm7tdmi/arm/display.rs diff --git a/arm7tdmi/src/arm/mod.rs b/src/arm7tdmi/arm/mod.rs similarity index 100% rename from arm7tdmi/src/arm/mod.rs rename to src/arm7tdmi/arm/mod.rs diff --git a/arm7tdmi/src/lib.rs b/src/arm7tdmi/mod.rs similarity index 78% rename from arm7tdmi/src/lib.rs rename to src/arm7tdmi/mod.rs index ac47331..4a9cfca 100644 --- a/arm7tdmi/src/lib.rs +++ b/src/arm7tdmi/mod.rs @@ -1,10 +1,5 @@ -#[macro_use] -extern crate enum_primitive_derive; -extern crate num_traits; - -extern crate bit; - pub mod arm; +pub use arm::arm_isa::ArmInstruction; pub const REG_PC: usize = 15; diff --git a/arm7tdmi/src/disass.rs b/src/disass.rs similarity index 91% rename from arm7tdmi/src/disass.rs rename to src/disass.rs index dc92dae..d2db387 100644 --- a/arm7tdmi/src/disass.rs +++ b/src/disass.rs @@ -5,12 +5,17 @@ use std::io::prelude::*; use std::fs::File; use std::convert::TryFrom; +#[macro_use] +extern crate enum_primitive_derive; +extern crate num_traits; + +extern crate bit; + extern crate byteorder; use byteorder::{LittleEndian, ReadBytesExt}; -extern crate arm7tdmi; - -use arm7tdmi::arm::arm_isa::ArmInstruction; +mod arm7tdmi; +use arm7tdmi::ArmInstruction; #[derive(Debug)] pub enum DisassemblerError {