Icpp release summary

We’re starting this topic to keep you up to date of new versions of icpp, to develop your smart contracts with C++.

We plan to bring out a new minor every week, until we are 100% Candid compliant.

Today we released icpp 1.2.0.

We added support for all the fixed width Candid types, and added many new tests to the QA canister.

For full overview of supported Candid Types, see the release notes.


Release icpp 1.4.0 has been released, with these additions:

  • Support for CandidTypeEmpty, CandidTypeReserved, CandidTypeFloat32, CandidTypeFloat64
  • Docs are now hosted on IC with custom domain https://docs.icpp.world/

We also did some internal refactoring, using Templates with Concepts. This reduced the amount of code to maintain for the fixed width types.

It was very nice to see that these modern C++ features work just fine when compiling with the wasi-sdk and deploying to the IC.


Version icpp 1.5.0 has been released, with these additions:
(See the release notes.)

  • Support for CandidTypePrincipal

This is a big milestone and we had to make some important decisions. Support for the CandidTypePrincipal requires base32 decoding/encoding and CRC32 checksum. We evaluated several C++ libraries for this, and decided to integrate these amazing open source vendor libraries into icpp:

Many thanks to the authors of these two libraries. We decided on them because they are small & dedicated to a single functionality, they are mature, have a great balance of speed vs. readability, and most of all, have great documentation with implementation examples.

Integrating them requires compilation to WASM. The cppcodec library required a small change, replacing a few exceptions with IC’s trap, and hash-library compiled without any changes at all.


I tried following the quickstart guide, and got hung up with cppcodec.

➜  greet dfx deploy
/opt/homebrew/lib/python3.11/site-packages/icpp/ic/candid/candid_type_principal.cpp:8:10: fatal error: 'cppcodec/base32_rfc4648.hpp' file not found
#include "cppcodec/base32_rfc4648.hpp"
1 error generated.
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed to build call canisters.
    Failed while trying to build all canisters.
      The build step failed for canister 'rrkah-fqaaa-aaaaa-aaaaq-cai' (greet) with an embedded error: Failed to build custom canister greet.: Failed to run icpp build-wasm.: The custom tool failed.
Time: 0h:00m:24s

@kpeacock ,
thank you for reporting this.
We created an issue and a patch was released.

Please upgrade to version 1.5.2 with:

pip install --upgrade --no-cache icpp

@kpeacock ,

Since we now know you’re trying it out :slight_smile: , thanks for that!, we would love to get your feedback. The good and the bad.

If you like to check out API examples beyond the greet canister, you can look at the QA canister, which has an identical folder structure:

Version icpp 1.5.3 has been released, with these additions:
(See the release notes.)

  • Support for CandidTypeVec
  • Test framework now supports unit testing on trapping canisters
  • Additional error checks for correctness of the bytes coming in from the wire

See here for an example of receiving, testing & sending many vectors at once over the wire.


We are seeing increasing interest in C++, and icpp passed 1,600 dowloads per month today.


For those of you who develop on Windows, we want to let you know that we fully support you with a windows based development environment.

Version 1.5.4 was just released, which fixed this issue related to the icpp install-wasi-sdk command, which detects your OS, downloads the proper wasi-sdk tar file, and install it in your .icpp folder in your home.

TLDR, you can now do the following on Windows in either a Powershell or a CMD window, identical to the way you would do it on Linux or Mac:

# install icpp
conda create --name test python==3.10
conda activate test
pip install icpp

# create the greet project
icpp init
cd greet

# build the wasm
icpp build-wasm

Next, we’re working on a seamless deploy experience to either the local or the main network. The dfx tool is not available on Windows, but we are looking at alternatives.

If you encounter any other issues on Windows or other platforms, please open an issue in the GitHub repo.

1 Like

Version 1.5.5 was released today.

We fixed the icpp build-native command on Windows, so you can interactively debug your C++ smart contract.


We released icpp-free 2.2.0 today, which has a full Candid API. Install with:

pip install icpp-free

The last types we added were the CandidTypeOpt & CandidTypeVariant.

For details, see the docs.

Next, we plan to develop some demo C++ Smart Contracts, including token contracts.


We released icpp-free 2.3.0 today, which includes:

  • API Reference
  • New GitHub repo icpp-demos with the example code of the API Reference.
  • Some small bug fixes discovered as we developed the Smart Contract code for the API Reference

We’re getting really close now to wrapping up the development phase, and couldn’t be more happy how things are coming together.

Target date for production release is July 17, 2023.

I will post more on the roll-out plan in a new thread once we start the official beta period, in a couple of weeks.

1 Like