Skip to content

Commit

Permalink
Add bignum support
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Apr 26, 2019
1 parent 9cc0d51 commit 2d9f40a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ wee_alloc = "0.4.4"
default = [ "std" ]
std = []
debug = []
bignum = []
5 changes: 5 additions & 0 deletions src/bignum.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// The bignum system library.
extern "C" {
pub fn bignum_mul256(a: *const u32, b: *const u32, ret: *mut u32);
pub fn bignum_umulmod256(a: *const u32, b: *const u32, mod: *const u32, ret: *mut u32);
}
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ pub mod types;
#[cfg(feature = "debug")]
pub mod debug;

#[cfg(feature = "bignum")]
pub mod bignum;

#[cfg(not(feature = "std"))]
pub mod convert;

Expand Down

0 comments on commit 2d9f40a

Please sign in to comment.