Skip to content

Commit

Permalink
Dummy, initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexhuszagh committed Dec 7, 2024
1 parent 87279f7 commit 25a0994
Show file tree
Hide file tree
Showing 3 changed files with 666 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lexical-util/src/i256.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//! An signed 256-bit integer type.
//!
//! This aims to have feature parity with Rust's signed
//! integer types, such as [i32][core::i32]. The documentation
//! is based off of [i32][core::i32] for each method/member.
// TODO: Document
// TODO: Feature gate this...

// FIXME: Add support for [Saturating][core::num::Saturating] and
// [Wrapping][core::num::Wrapping] when we drop support for <1.74.0.

/// The 256-bit signed integer type.
///
/// This has the same binary representation as Apache Arrow's types,
/// and therefore can safely be transmuted from one to the other.
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Default, PartialEq, Eq, Hash)]
#[repr(C)]
pub struct i256 {
lo: u128,
hi: i128,
}

impl i256 {
// TODO: Here
}
2 changes: 2 additions & 0 deletions lexical-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,14 @@ pub mod error;
pub mod extended_float;
pub mod f16;
pub mod format;
pub mod i256;
pub mod iterator;
pub mod mul;
pub mod num;
pub mod options;
pub mod result;
pub mod step;
pub mod u256;

mod api;
mod feature_format;
Expand Down
Loading

0 comments on commit 25a0994

Please sign in to comment.