arcis 0.6.0-alpha

A standard library of types and functions for writing MPC circuits with the Arcis framework.
Documentation
/// If this macro is ever ran by the interpreter, this will be a compile error.
/// ```
/// use arcis::*;
///
/// #[encrypted]
/// mod circuits {
///     use arcis::*;
///     fn second_element(arr: &[u8]) -> u8 {
///         if arr.len() < 2 {
///             // Such `if` can be evaluated at compile-time.
///             // The interpreter will know the size of the array and this panic will be triggered
///             // if the array is too small, resulting in a compile error.
///             arcis_static_panic!("array too small");
///         }
///         arr[1] // Note that this would have resulted in a compile error anyway.
///     }
///     const ARRAY_LEN: usize = 3; // Change to 1 and the example will not compile.
///     #[instruction]
///     fn reveal_second_element(input: Enc<Shared, Pack<[u8; ARRAY_LEN]>>) -> u8 {
///         let array = input.to_arcis().unpack();
///         second_element(&array).reveal()
///     }
/// }
/// ```
#[macro_export]
macro_rules! arcis_static_panic {
    ($($arg:tt)*) => (panic!($($arg)*))
}