Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ publish = false
missing_docs = "deny"
unsafe_code = "forbid"

[workspace.dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "^1.0" }
hex = { version = "^0.4.3" }
chrono = { version = "0.4", features = ["serde"] }

[workspace.lints.clippy]
arithmetic_side_effects = "deny"
cast_lossless = "deny"
Expand Down
4 changes: 4 additions & 0 deletions crates/charon-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ license.workspace = true
publish.workspace = true

[dependencies]
serde.workspace = true
serde_json.workspace = true
hex.workspace = true
chrono.workspace = true

[lints]
workspace = true
35 changes: 2 additions & 33 deletions crates/charon-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,5 @@
//! This crate provides the fundamental building blocks, data structures, and
//! core algorithms used throughout the Charon system.

/// Adds two numbers together.
///
/// # Arguments
///
/// * `left` - The first number to add
/// * `right` - The second number to add
///
/// # Returns
///
/// The sum of the two numbers
///
/// # Examples
///
/// ```
/// use charon_core::add;
///
/// let result = add(2, 2);
/// assert_eq!(result, 4);
/// ```
pub fn add(left: u64, right: u64) -> u64 {
left.wrapping_add(right)
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
/// Types for the Charon core.
pub mod types;
Loading