Skip to content

saber-hq/u128

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

u128

U128 helpers for Solana programs.

Crates.io License Build Status Contributors

Motivation

U128 division is very inefficient on Solana BPF. This crate exposes a [U128] type derived using the uint crate as a stopgap.

Usage

Since u128 is a built-in type in Rust, you'll need to use the fully-qualified name like so:

use ::u128::mul_div_u64;

License: Apache-2.0