diff options
author | iximeow <me@iximeow.net> | 2019-04-21 14:17:13 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 17:08:59 -0800 |
commit | 0fdec7677c94d6bd89a78006de7dc07d3e60e3b3 (patch) | |
tree | 8f81b227d0c93fda85104dc749d1d4402b8f7441 /src/lib.rs | |
parent | 274fdaf33a7debb32e95ab57a41f9c03b173e164 (diff) |
awful tweaks to expose a serde flag on yaxpeax-arch which will trickle through everything
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,10 @@ +#[cfg(feature="use-serde")] +#[macro_use] extern crate serde_derive; +#[cfg(feature="use-serde")] +extern crate serde; +#[cfg(feature="use-serde")] +use serde::{Serialize, Deserialize}; + extern crate yaxpeax_arch; extern crate termion; @@ -5,8 +12,14 @@ use yaxpeax_arch::{Arch, Decodable, LengthedInstruction}; mod display; +#[cfg(feature="use-serde")] +#[derive(Debug, Serialize, Deserialize)] +pub struct MSP430; + +#[cfg(not(feature="use-serde"))] #[derive(Debug)] pub struct MSP430; + impl Arch for MSP430 { type Address = u16; type Instruction = Instruction; |