What libraries can be used when writing a contract in C++? What are the limitations? If I have a library I normally use and like, how do I compile it for use by contracts?

2 Answers 2


Contracts are in WASM which is a compiled binary language. The only currently tested and validated language for EOS smart contract development is C++, but in theory any language that compiles down to WASM can be used. There is an active community effort to support TypeScript as well.

  • 3
    I think expaand is asking about which C++ libraries they can use, but I may be mistaken. Jun 6, 2018 at 16:33
  • 1
    Yes, that is what I was asking. And what limitations are there, if any?
    – expaand
    Jun 7, 2018 at 12:45
  • 2
    I know boost comes included and supported. STL of course. There is a library of contracts that comes included which has contracts for social media, an exchange, a token contract, etc. Then there is a library of objects as well.
    – Nat
    Jul 21, 2018 at 10:53
  • @Nat, aware of the system token contract, but where are the others you mention, like an exchange?
    – Walter K
    Nov 7, 2018 at 8:55
  • @WalterK github.com/EOSIO/eos/tree/master/contracts looks like they've removed the exchange contract. Feel free to go back to a previous release to find it.
    – Nat
    Nov 7, 2018 at 13:29

The code for Boost is in https://github.com/EOSIO/eosio.cdt/tree/master/libraries/boost

The main EOS library is eosiolib, and it uses Boost in action.hpp, dispatcher, datastream, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.