Skip to content

Commit

Permalink
change(dep): remove bincode support
Browse files Browse the repository at this point in the history
reason: no new stable version for 3 years
  • Loading branch information
SaadiSave committed Nov 20, 2024
1 parent b1e98d5 commit 6211d17
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 22 deletions.
6 changes: 1 addition & 5 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,13 @@ rustdoc-args = ["--cfg", "docsrs"]
[features]
default = ["compile", "extended"]
extended = []
compile = ["serde", "bincode"]
compile = ["serde"]

[dependencies]
logos = "0.12"
log = "0.4"
thiserror = "1"

[dependencies.bincode]
version = "2.0.0-rc.1"
optional = true

[dependencies.serde]
version = "1"
features = ["derive"]
Expand Down
5 changes: 0 additions & 5 deletions lib/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ use std::{collections::BTreeMap, fmt::Display, ops::Deref, path::Path, str::From
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

#[cfg(feature = "bincode")]
use bincode::{Decode, Encode};

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "bincode", derive(Encode, Decode))]
#[derive(Debug)]
struct CompiledInst {
pub id: u64,
Expand All @@ -35,7 +31,6 @@ type CompiledTree = BTreeMap<usize, CompiledInst>;

/// Represents a compiled program ready to be serialized into a file
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "bincode", derive(Encode, Decode))]
#[derive(Debug)]
pub struct CompiledProg {
prog: CompiledTree,
Expand Down
4 changes: 0 additions & 4 deletions lib/src/exec/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ use std::collections::BTreeMap;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

#[cfg(feature = "bincode")]
use bincode::{Decode, Encode};

use crate::parse::Span;

/// Struct to store original labels of shuffled addresses
#[derive(Default, Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "bincode", derive(Encode, Decode))]
pub struct DebugInfo {
/// Original labels of instructions
pub prog: BTreeMap<usize, String>,
Expand Down
4 changes: 0 additions & 4 deletions lib/src/exec/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ use std::{
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

#[cfg(feature = "bincode")]
use bincode::{Decode, Encode};

/// Struct providing random-access memory (RAM)
#[derive(Debug, Default, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "bincode", derive(Encode, Decode))]
#[repr(transparent)]
pub struct Memory(BTreeMap<usize, usize>);

Expand Down
4 changes: 0 additions & 4 deletions lib/src/inst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ use std::{fmt::Display, ops::Deref, str::FromStr};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

#[cfg(feature = "bincode")]
use bincode::{Decode, Encode};

/// Represents all possible types of pseudoassembly operands
#[derive(PartialEq, Debug, Clone, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "bincode", derive(Encode, Decode))]
pub enum Op {
Fail(String),
Acc,
Expand Down

0 comments on commit 6211d17

Please sign in to comment.