Skip to content

Commit

Permalink
dusk-core: added serde support
Browse files Browse the repository at this point in the history
  • Loading branch information
d-sonuga committed Dec 23, 2024
1 parent 594f9b3 commit 0b0c5c4
Show file tree
Hide file tree
Showing 4 changed files with 1,786 additions and 0 deletions.
17 changes: 17 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ ark-bn254 = { workspace = true, features = ["curve"], optional = true }
ark-relations = { workspace = true, optional = true }
ark-serialize = { workspace = true, optional = true }

# serde support dependencies
serde = { workspace = true, features = ["derive"], optional = true }
serde_json = { workspace = true, optional = true }
hex = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }

[dev-dependencies]
rand = { workspace = true, features = ["std", "std_rng"] }

Expand Down Expand Up @@ -63,3 +69,14 @@ groth16 = [

# Enables std feature for dusk-plonk
std = ["dusk-plonk/std"]

serde = [
"dep:serde",
"serde_json",
"hex",
"base64",
"piecrust-uplink/serde",
"bls12_381-bls/serde",
"phoenix-core/serde",
"dusk-jubjub/serde",
]
3 changes: 3 additions & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ pub use error::Error;
mod dusk;
pub use dusk::{dusk, from_dusk, Dusk, LUX};

#[cfg(feature = "serde")]
mod serde_support;

// elliptic curve types
pub use dusk_bls12_381::BlsScalar;
pub use dusk_jubjub::{
Expand Down
Loading

0 comments on commit 0b0c5c4

Please sign in to comment.