Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Releases: EOSIO/eosio.cdt

[CANDIDATE] EOSIO.CDT Version 1.6.0-rc2

07 Mar 01:11
039526e
Compare
Choose a tag to compare
Pre-release

This is a RELEASE CANDIDATE for version 1.6.0. The latest STABLE release is v1.5.0.

This release provides several bug fixes to 1.6.0-rc1 and also adds unit/regression tests to eosio.cdt/libraries/eosiolib/. These changes build on the changes outlined in the Release Candidate 1 (v1.6.0-rc1).

Summary Of Changes

  • (#412) Fix codegen for niladic actions.
  • (#416) Fix contract::get_datastream() accessor to return a reference to it's datastream object.
  • (#418) A few fixes for eosio::onerror asserting and contracts with no actions defined.
  • (#424) Addition of eosiolib unit tests.
  • (#419) Changes to fix issue with compiling with the wrong LP64 model.
  • (#426) Various small fixes for user experience and more support for wasm-ql.
  • (#427) Fix for mac OS X debug native contract compilation, now supports source level debugging.
  • (#439) Renaming of exported functions for wasm-ql.

Disclaimer: Block.one makes its contribution on a voluntary basis as a member of the EOSIO community and is not responsible for ensuring the overall performance of the software or any applications related thereto. We make no representation, warranty, guarantee or undertaking in respect of the releases described herein, the related GitHub release, the EOSIO software or any documentation related to any of the foregoing, whether expressed or implied, and disclaim all liability that may arise from any use of the software or documentation for any purpose. Any test results or performance figures are indicative and will not reflect performance under all conditions. Any reference to any third party or third-party product, resource or service is not an endorsement or recommendation by Block.one.

[CANDIDATE] EOSIO.CDT Version 1.6.0-rc1

08 Feb 04:10
1cd8964
Compare
Choose a tag to compare
Pre-release

eosiolib

  • Partitioning of eosiolib into three groups (CAPI, Contracts, and Core), these allow for finer grained allowance for particular modes of compilation. #405
    • The CAPI will only be available to contract writers using eosio-cc and purely for C smart contracts.
    • The Contracts will be available to eosio-cpp for smart contract writing.
    • Core will be available to eosio-cpp for any of the modes (present and future).
    • eosio-cpp in fnative mode will have access to all of these groups.
  • New simple, small and fast grab-bag malloc is being introduced as the new default malloc. Caveats are that this will not free any memory when calling free (essentially a noop). If your contract needs to free memory because of overrunning malloc'd memory, then passing the flag use-freeing-malloc to the compiler you can opt in to using the old implementation. #356
  • New data structure eosio::rope is introduced in this release. This is a thin data structure for fast string concatenations, this will be more useful for wasm-ql when it arrives. #356
  • Fix off by one error in varint.hpp. #402

new libraries

  • Softfloat and compiler-rt are introduced in this release, these can be used with the flag use-rt to produce a binary that doesn't import the compiler-rt intrinsics. This is useful for generating WebAssembly that is more self-contained. This will be more useful when wasm-ql arrives and future WASM modes are added. #325

tools

eosio-cpp

  • Auto generation of dispatcher for smart contracts. #395
  • Two new function hooks, pre_dispatch and post_dispatch have been added for flexibility in control over smart contract dispatching. #395
  • New attribute [[eosio::on_notify]] to facilitate notification handling. #395
  • ABI linking at the link stage of building smart contracts, this now allows for splitting your smart contract into multiple implementation files and still have ABI generation work. #395
  • Created system for modal compilation, i.e. native, eosio smart contract, wasm-ql, and more flavors in the future. #356
  • New attribute [[eosio::wasm_entry]] is introduced to allow for a naming agnostic way of having an arbitrary WebAssembly entry function wrapped with global constructor and destructor calls. #358
  • New attribute [[eosio::wasm_import]] is introduced to allow for a more dynamic way of specifying WASM imports then a standalone file. This also allows for different libraries to easily expose their own import API. #358
  • Fixes for eosio-abigen | eosio-cpp for issues with std::variant types, and nested std::variant #399
  • Removed timestamp from generated ABI file. #352

eosio-abigen

  • This tool is now deprecated because of the "ABI" linking capabilities of eosio-ld and eosio-cpp. In the future use eosio-cpp with the --abigen flag, the ABI shouldn't change unless you change your code, so these two should be linked anyway. #377

eosio-ld

  • Linkage of ABIs (now held in the object files), to produce the generated ABI. #395

eosio-init

  • Fix for invalid project names. #370

Special Thanks

  • conr2d
  • maoueh

EOSIO.CDT Version 1.5.0

16 Jan 02:31
6444828
Compare
Choose a tag to compare

repo

  • Using new model for eosio.cdt cmake subsystem for building libraries.
  • Added new libraries for native support for native compilation for testing and "scratch pad" compilation for contract developers.
  • Updated license year #339

eosiolib

  • Added new set of functions (eosio::check) to supersede eosio_assert functions #318
    • overloads to support eosio_assert, eosio_assert_message and eosio_assert_code are supported.
    • these new functions should increase performance of smart contracts by not calling the intrinsic unless the test condition fails.
  • Removed memory.h #318
  • Removed activate_feature intrinsic from privileged.h #318
  • Resolved issues with eosio::print and std::string #318
  • Replaced all occurrences of eosio_assert with eosio::check #318
  • Allow for ""_n to be used to create a zero name (eosio::name{0}) #311
  • Added c++ guards on system.h #312
  • Removed references to nonexistent uint256_t type #333
  • Simplified comments for eosio::multi_index #328
  • Resolved issues witheosio::print and integral types #347

nativelib

  • Fixed support for checking prints with native testing framework #341
  • Added a minimal crt for native contract compilation #317
  • Build libc, libcxx, and eosiolib for native linkage #317
  • Added framework for setting and getting intrinsics core functions. #317
    • In the future libraries can be built to fill in a default implementation of the complex intrinsics. Currently only the eosio_assert*, memcpy/cmp/move, soft float, and print* intrinsics have usable defaults, all others will assert with the message "unsupported intrinsic". Also, only the print* intrinsics can be reset in terms of their default functionality.
  • A testing framework for supporting eosio_assert/eosio::check as catchable and the ability to assert in the test or contract code and continue the test forward. #317
    • REQUIRE_ASSERT and CHECK_ASSERT function much like BOOST's CHECK_THROW and REQUIRE_THROW, but use the assert message as the predicate instead of an exception type. This checking the assertion message can either be a simple string, which will do a 1 to 1 match of this and the assert message, or you can pass it a lambda that takes a std::string and return a bool so more complex checking can be done.
    • CHECK_EQUAL and REQUIRE_EQUAL work almost identically to BOOST's.
    • For examples of how to use these see ./tests/unit/system_tests.cpp or ./tests/unit/name_tests.cpp.
  • Test registration to support CTest and pretty print which tests pass or fail. #317
  • Fixed linkage issues for mac OS X #326

cmake

  • A new pattern for cmake use in smart contract development. #291
    • This new pattern utilizes the EosioWasmToolchain.cmake as a cmake toolchain file and uses an external cmake project to build the contract code, see the new eosio-init tool.
  • To support native builds with eosio-cpp two new macros add_native_executable and add_native_library, these work identically to cmake's add_executable and add_library.

tools

  • New tool eosio-init is introduced #317
    • This tool will generate a project for smart contract development, either as a bare eosio-cpp project or cmake project. This tool takes a required project name, an optional path and an optional bare flag.
      • The "bare" version will generate a <project name>.hpp, a <project name>.cpp, a <project name>.contracts.md and a readme with how to build the contract.
      • The default/non-bare version will create a source tree with the proper cmake files, the above mentioned files in their respective folders, and a readme with instructions of how to build the contract.
  • Support for native builds with eosio-cpp/cc and eosio-ld #317
    • this is functionality is exposed with the fnative flag for each of the above tools.
  • Fixes for eosio-abidiff #298
  • Fixes for eosio-abigen for yet more nested types #291

[CANDIDATE] EOSIO.CDT Version 1.5.0-rc2

02 Jan 20:54
c51c6d4
Compare
Choose a tag to compare
Pre-release
  • Fixed support for checking prints with native testing framework #341
  • Fixed linkage issues for mac OS X #326
  • Removed references to nonexistent uint256_t type #333
  • Simplified comments for eosio::multi_index #328
  • Updated license year #339

[CANDIDATE] EOSIO.CDT Version 1.5.0-rc1

12 Dec 05:58
Compare
Choose a tag to compare
Pre-release

repo

  • Using new model for eosio.cdt cmake subsystem for building libraries.
  • Added new libraries for native support for native compilation for testing and "scratch pad" compilation for contract developers.

eosiolib

  • Added new set of functions (eosio::check) to supersede eosio_assert functions #318
    • overloads to support eosio_assert, eosio_assert_message and eosio_assert_code are supported.
    • these new functions should increase performance of smart contracts by not calling the intrinsic unless the test condition fails.
  • Removed memory.h #318
  • Removed activate_feature intrinsic from privileged.h #318
  • Resolved issues with eosio::print and std::string #318
  • Replaced all occurrences of eosio_assert with eosio::check #318
  • Allow for ""_n to be used to create a zero name (eosio::name{0}) #311
  • Added c++ guards on system.h #312

nativelib

  • Added a minimal crt for native contract compilation #317
  • Build libc, libcxx, and eosiolib for native linkage #317
  • Added framework for setting and getting intrinsics core functions. #317
    • In the future libraries can be built to fill in a default implementation of the complex intrinsics. Currently only the eosio_assert*, memcpy/cmp/move, soft float, and print* intrinsics have usable defaults, all others will assert with the message "unsupported intrinsic". Also, only the print* intrinsics can be reset in terms of their default functionality.
  • A testing framework for supporting eosio_assert/eosio::check as catchable and the ability to assert in the test or contract code and continue the test forward. #317
    • REQUIRE_ASSERT and CHECK_ASSERT function much like BOOST's CHECK_THROW and REQUIRE_THROW, but use the assert message as the predicate instead of an exception type. This checking the assertion message can either be a simple string, which will do a 1 to 1 match of this and the assert message, or you can pass it a lambda that takes a std::string and return a bool so more complex checking can be done.
    • CHECK_EQUAL and REQUIRE_EQUAL work almost identically to BOOST's.
    • For examples of how to use these see ./tests/unit/system_tests.cpp or ./tests/unit/name_tests.cpp.
  • Test registration to support CTest and pretty print which tests pass or fail. #317

cmake

  • A new pattern for cmake use in smart contract development. #291
    • This new pattern utilizes the EosioWasmToolchain.cmake as a cmake toolchain file and uses an external cmake project to build the contract code, see the new eosio-init tool.
  • To support native builds with eosio-cpp two new macros add_native_executable and add_native_library, these work identically to cmake's add_executable and add_library.

tools

  • New tool eosio-init is introduced #317
    • This tool will generate a project for smart contract development, either as a bare eosio-cpp project or cmake project. This tool takes a required project name, an optional path and an optional bare flag.
      • The "bare" version will generate a <project name>.hpp, a <project name>.cpp, a <project name>.contracts.md and a readme with how to build the contract.
      • The default/non-bare version will create a source tree with the proper cmake files, the above mentioned files in their respective folders, and a readme with instructions of how to build the contract.
  • Support for native builds with eosio-cpp/cc and eosio-ld #317
    • this is functionality is exposed with the fnative flag for each of the above tools.
  • Fixes for eosio-abidiff #298
  • Fixes for eosio-abigen for yet more nested types #291

EOSIO.CDT Version 1.4.1 Release Notes

14 Nov 02:08
6f14991
Compare
Choose a tag to compare

repo

  • Removed Remove CMAKE_CXX_STANDARD 17 from EosioWasmToolchain.cmake #267
    • This was causing issues for Centos users and for users with low CMake versions
  • Added binary builds for Centos

eosiolib

  • Force compile time execution of name #249
  • Fixed regression in eosio::fixed_key<T> #255
  • Fixed eosio::multi_index::begin bug #256

tools

  • Fixed symlinks for various installed tools #268

EOSIO.CDT Version 1.4 Release Notes

08 Nov 01:29
94c517c
Compare
Choose a tag to compare

repo

  • Small examples of hello, send_inline and multi_index were added/modified. #247
  • Added installation of licenses for binary packages. #238
  • Added Dockerfile. #206

eosio-abidiff

  • New tool to compare and report changes in ABI structures/names. #229

eosiolib

  • New data type eosio::binary_extension added. #229.
  • Serialization support fo eosio::binary_extension and std::variant added. #229
  • New type eosio::fixed_bytes<T> and aliases eosio::checksum160/256/512 added as C++ replacements for capi_checksum types. #243
  • eosio::fixed_key<T> and by extension eosio::key256 are deprecated and are replaced by eosio::fixed_bytes<t> and the eosio::checksum256 alias respectively.
  • C++ wrappers for the crypto asserts added, (e.g. assert_sha1/256/512). #236
  • Various bug fixes #233
    • Added missing asset::to_string #169.
    • Fixed asset::print() #230
    • Fixed name user defined literal to ensure compile time evaluation #232
    • Fixed eosio::print not supporting std::string rvalue
  • Updated multi_index documentation #226
  • New types eosio::action_wrapper and eosio::variant_action_wrapper added for a more simplified and type-safe method to send inline actions. #229

eosio-abigen

  • eosio-abigen now produces ABI v1.1, this has been available in nodeos since EOS v1.3.x, please note if an ABI serialization library/tool only supports ABI v1.0 this will break compatibility.
  • Automatic import of ricardian contracts into generated ABI. #207
  • Support for non-type templates in ABI generation. #246
  • Support for binary_extensions and std::variant added and now switch to producing abi v1.1. #229
  • Support for tuple, set, map, std::pair and generic template types for ABI generation. #229
  • Various bug fixes #241, #208

eosio-cpp

  • Various bug fixes
    • added missing options to generate dep files for Ninja builds. #233
    • fixed lto option mismatch #233

EOSIO.CDT Version 1.3.2 Release Notes

17 Oct 00:35
32c9ae7
Compare
Choose a tag to compare

eosio-abigen

Fixes for eosio-abigen table generation regression. #161

eosiolib

Adding missing const declaration qualifiers #164

EOSIO.CDT Version 1.3.1 Release Notes

11 Oct 23:08
1d0398f
Compare
Choose a tag to compare

eosiolib

  • symbol.hpp
    • Added a constexpr constructor to take a std::string_view (to construct a symbol_code) and a uint8_t (precision), so instead of symbol(symbol_code("SYS"), 4), you can use symbol("SYS", 4) #150

eosio-abigen

  • Fixed the issue with unwanted structs not being filtered out #150
  • Fixed the issue with C++17 not being used to compile when calling eosio-abigen explicitly #150

libcxx

  • Patched locale to allow for compilation of std::stringstream, std::regex. #150
  • Added warnings to the headers of sstream, regex, strstream that indicate that using these types will greatly increase the size of the compiled contract. #150
  • Added error for iostream, as this conflicts with eosio::datastream #150

EOSIO.CDT Version 1.3.0 Release Notes

11 Oct 00:12
cb1a407
Compare
Choose a tag to compare

eosiolib C API

  • addition of uint64_t typedef capi_name #132
  • removal of uint64_t typedefs #132
    • account_name
    • permission_name
    • scope_name
    • table_name
    • action_name
      • these have been replaced by capi_name, and as a practice should not be used. The new version of the name type should be used to replace these instances. This decision was made because of bad implict casting issues with uint64_t and the new pattern should allow for better type safety.
    • symbol_name
      • this has no C equivalent and is superceded by the symbol_code struct. As with the previously mentioned named types, this was removed and replaced with symbol_code to allow for better type safety in contracts. To use a symbol, i.e. symbol name and precision, use the symbol class.
  • removal of time and weight_type typedefs #132
  • removal of the typedefs transaction_id_type and block_id_type #132
  • removal of the account_permission struct #132
  • renaming of typedefs #132
    • checksum160 -> capi_checksum160
    • checksum256 -> capi_checksum256
    • checksum512 -> capi_checksum512
    • public_key -> capi_public_key
    • signature -> capi_signature
  • removal of non-existent intrinsics declarations require_write_lock and require_read_lock #132

eosiolib C++ API

  • removal of eosiolib/vector.hpp #132
    • removed alias eosio::vector and typedef bytes
  • removal of eosiolib/types.hpp #132
  • removal of eosiolib/optional.hpp #136
  • removal of eosiolib/core_symbol.hpp #122
  • added eosiolib/name.hpp #132

eosiolib/types.hpp

  • moved the typedef eosio::extensions_types to eosiolib/transaction.hpp #132
  • removed comparison functions for checksum structs #132
  • removal of eosio::char_to_symbol, eosio::string_to_name, eosio::name_suffix functions #132
  • removal of the N macro. #132
  • moved eosio::name struct definition and ""_n operator to eosiolib/name.hpp #132

eosiolib/name.hpp

  • removal of implicit and explicit conversions to uint64_t. #132
  • addition of enum class eosio::name::raw #132
  • added bool conversion operator for conditionally testing if a name is empty #132
  • all constructors are now constexpr #132
  • added constexpr methods eosio::name::length, eosio::name::suffix #132
  • added equivalence, inverted equivalence and less than operators to eosio::name #132

eosiolib/symbol.hpp

  • removed eosio::symbol_type struct and replaced with eosio::symbol class #122
  • added struct eosio::symbol_code #122
    • added two constexpr constructors that take either a raw uint64_t or an std::string_view
    • added constexpr methods is_valid, length and raw
    • added a print method
    • added bool conversion operator to test is symbol_code is empty
  • removal of eosio::string_to_symbol, eosio::is_valid_symbol, eosio::symbol_name_length functions #122
  • removal of the S macro. #122
  • added struct eosio::symbol #122
    • added two constexpr constructors that take either a raw uint64_t or a symbol_code and a uint8_t precision.
  • modified struct eosio::extended_symbol #132
    • restricted fields to private
    • added constexpr constructor that takes a eosio::symbol and an eosio::name.
    • added constexpr methods get_symbol and get_contract.
    • made existing comparison operators constexpr

eosiolib/asset.hpp

  • The main constructor now requires a int64_t (quantity) and eosio::symbol explicitly. #132

eosiolib/contract.hpp

  • The constructor for eosio::contract now takes an eosio::name for the receiver, an eosio::name for the code, and a eosio::datastream<const char*> for the datastream used for the contract. The last argument is for manually unpacking an action, see the section on eosio::ignore for a more indepth usage. #136

eosiolib/dispatcher.hpp

  • renamed the macro EOSIO_ABI to EOSIO_DISPATCH, as this makes more sense as to what this macro does. #136
  • modified the definition of EOSIO_DISPATCH to work with the new constructor for eosio::contract

eosiolib/multi_index.hpp

  • the first template parameter for indexed_by now requires the argument be convertible to eosio::name::raw (replacing uint64_t. #132
  • the first template parameter for multi_index now requires the argument be convertible to eosio::name::raw (replacing uint64_t. #132
  • the constructor now takes an eosio::name type for the code (replacing uint64_t), scope is still uint64_t. #132
  • various other replacements of uint64_t to eosio::name #132

eosiolib/singleton.hpp

  • the first template parameter for eosio::singleton now requires the argument be convertible to eosio::name::raw (replacing uint64_t. #132
  • the constructor now takes an eosio::name type for the code. #132
  • in the methods get_or_create and set the argument bill_to_account is now of type eosio::name (replacing uint64_t). #132

eosiolib/action.hpp

  • added C++ function eosio::require_auth #132
  • added C++ function eosio::has_auth #132
  • added C++ function eosio::is_account #132
  • redefined eosio::permission_level to use eosio::name in place of uint64_t #132
  • removed the macro ACTION #136

eosiolib/permission.hpp

  • The optional provided_keys argument of the function eosio::check_transaction_authorization is now of the type std::set<eosio::public_key> rather than the type std::set<capi_public_key>. #132
  • the account and permission arguments of eosio::check_transaction_authorization are both eosio::name now instead of uint64_t #132

eosiolib/ignore.hpp

  • added new type ignore #133
    • this type acts as a placeholder for actions that don't want to deserialize their fields but what the types to be reflected in the abi.
      ACTION action(ignore<some_type>) { some_type st; _ds >> st; }
  • added new type ignore_wrapper #133
    • this allows for calling SEND_INLINE_ACTION with ignore_wrapper(some_value) against an action with an ignore of matching types.

macros

  • added ACTION macro, this is simply a wrapper for [[eosio::action]] void #136
  • added TABLE macro, this is simply a wrapper for struct [[eosio::table]] #136
  • added CONTRACT macro, this is simply a wrapper for class [[eosio::contract]] #136

CMake

  • added eosio.cdt-config.cmake to allow for find_package(eosio.cdt) #105
  • added new macro add_contract #136
  • new version checking mechanism is included, see eosio.contracts/CMakeLists.txt to see this in use. #111

libc

  • replaced printf, sprintf, and snprintf with new minimal variants, and allows contracts to use these functions without causing stack overflow issues. #142

libcxx

  • removed sstream, with the intent to return this after more has been done. #142
  • added __cxa_pure_virtual to allow for pure virtual methods in contract classes. #142
  • std::to_string now works without the issues of stack overflows. #142

attributes

  • added [[eosio::ignore]] attribute to flag a type as being ignored by the deserializer, this attribute is primarily only used for internal use within eosiolib. #133
  • added [[eosio::contract]] attribute #133

boost

  • is now part of the library (Boost will be removed in a future release), no more external dependence on Boost and all system inclusion are within it's sysroot. #105

eosio-cpp

  • bumped the default standard to C++17 #133

eosio-abigen

  • various fixes for vector, optional, stalling. Produces accurate abis for eosio.contracts.