Installation

Concrete 0.2.0 is the first version of the new Concrete Library. It is based on experimental features in concrete-core through the intermediate libraries (concrete-integer, concrete-shortint). It is published with a temporary dependency concrete-core-experimental. Future versions of Concrete 0.2 will be based on a public version of concrete-core.

Importing into your project

To use concrete in your project, you first need to add it as a dependency in your Cargo.toml:

concrete = { version = "0.2.0", features = [ "booleans" ] }

Choosing your features

concrete exposes different cargo features to customize the types and features used.

Kinds.

concrete types

This crate exposes 3 kinds of data types. Each kind is enabled by activating its corresponding feature in the TOML line. Each kind may have multiple types:

KindCargo FeatureType(s)

Booleans

booleans

ShortInts

shortints

Integers

integers

Serialization.

By enabling the serde feature, the different data types and keys exposed by the crate can be serialized / deserialized.

Enabling all features.

Copy this if you would like to enable all features:

concrete = { version = "0.2.0", features = [ "booleans", "shortints", "integers", "serde"] }

Supported platforms

As concrete relies on concrete-core, concrete is only supported on x86_64 Linux and x86_64 macOS.

Windows users can use concrete through the WSL.

Apple Silicon instructions

macOS users who have Apple Silicon (arm64) devices can use concrete by compiling using the nightly toolchain

First, install the needed Rust toolchain:

rustup toolchain install nightly

Then, you can either:

  • Manually specify the toolchain to use in each of the cargo commands:

For example:

cargo +nightly build
cargo +nightly test
  • Or override the toolchain to use for the current project:

rustup override set nightly
# cargo will use the `nightly` toolchain.
cargo build

To check the toolchain that Cargo will use by default, you can use the following command:

rustup show

Last updated