arcis-interpreter-proc-macros

Crates.ioarcis-interpreter-proc-macros
lib.rsarcis-interpreter-proc-macros
version0.3.0
created_at2025-04-30 19:36:20.452566+00
updated_at2025-09-02 14:24:42.276863+00
descriptionProcedural macros for writing MPC circuits with Arcis framework.
homepagehttps://www.arcium.com
repository
max_upload_size
id1655380
size27,459
Daniel (danielementary)

documentation

README

arcis-interpreter-proc-macros

Crates.io

Procedural macros for writing MPC circuits with the Arcis framework. This crate provides the attribute and derive macros that enable the ergonomic syntax for defining encrypted computations, making it easier to write secure multi-party computation logic in Rust.

Usage

use arcis_interpreter_proc_macros::encrypted;

#[encrypted]
fn secure_computation(a_ctx: Enc<Shared, u32>, b_ctx: Enc<Shared, u32>) -> Enc<Shared, u32> {
    // This function will be compiled into an MPC circuit
    let a = a_ctx.to_arcis();
    let b = b_ctx.to_arcis();
    a_ctx.owner.from_arcis(a + b)
}

Main Functionality

This procedural macro crate provides:

  • Attribute macros for marking functions as encrypted computations
  • Derive macros for custom types used in circuits
  • Syntax transformations that convert regular Rust code into MPC-compatible circuits

The macros are typically used through the arcis-imports crate, which re-exports them for convenient access.

Commit count: 0

cargo fmt