EOSCC Preview Version Release: Yet another EOSIO Contract Development Toolkit
Now SIO4.CDT is renamed to EOSCC.
I’m pleased to announce the release of the preview version of EOSCC S̶I̶O̶4̶.̶C̶D̶T̶, which is EOSIO-compatible contract development toolkit. This is heavily based on EOSIO.CDT, the original version, but contains some fixes and improvements.
https://github.com/turnpike/eoscc/releases/tag/v1.6.3-pre1
[[deprecated]]
SIO4.CDT is a part of 3OSiO project, a community-maintained fork of EOSIO for blockchain research. A set of reliable and stable software is provided by EOSIO, but 3OSiO is aiming at RERO (release early, release often) including experimental features. If you are curious about why the namespace is sio4 instead of 3osio, you can find the answer from here.
To keep compatibility and provide same user experience, almost all interfaces (eg. executable filename like eosio-cpp) except for package name are unchanged. As a result, it is not installable alongside EOSIO.CDT, but needs replacement.
The development of EOSCC is at a very early stage, so its testing is not complete. This is already utilized in daily development, but using it in production is at your own risk. Any feature requests or bug reports are welcome.
This release includes following changes. For a full list, please refer to the release notes.
Fix segmentation faults / Improve ABI generation
There were corner cases that make contract build fail by segmentation fault. The preview version of SIO4.CDT includes fix for following issues.
EOSIO/eosio.cdt #527, #541, #558, #600
ABI generation is also improved. In some cases, type is missing from generated ABI, but now they are all included in output correctly.
Upgrade libc++ / Add support for c++2a libraries
libc++ (libcxx) is upgraded from 5.0.0 to 9.0.0-rc2, and SIO4.CDT supports c++2a standard by default (EOSIO.CDT uses c++17). That is, you can use the methods marked as c++20 in your contract.
For example, std::string::starts_with has been supported since c++20, and the next example works with SIO4.CDT.
The underlying Clang is still version 7, so core-level features supported in later versions are not supported yet.
Add support for ctime
<ctime> is not supported by EOSIO.CDT. Its missing could be intended, because it can raise false expectations that time related functions will work same in native environment. For convenience, ctime is restored in SIO4.CDT, but you should understand what you are doing. For example, std::time returns the UNIX time in seconds, but it’s a block timestamp rather than real time. (wrapping eosio::current_time)
Upgrade libc
libc (musl) is upgraded from 1.1.18 to 1.1.23. There are several advantages in this upgrade. For example, math library got new implementations in 1.1.23. The code size increases, but also its performance is improved. RAM costs once, but CPU is consumed per transaction, so if your contract has heavy math calculations, choosing performance might be better. The only thing you need to do for getting these benefits is recompiling existing contract with SIO4.CDT.
Disclaimer
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.