Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mandel references from CDT and update CDT urls #2

Merged
merged 6 commits into from
Aug 14, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ install(FILES ${CMAKE_BINARY_DIR}/scripts/ricardeos.py DESTINATION ${CDT_INSTALL
# section for package construction
set(VENDOR "EOSNetworkFoundation")
set(PROJECT_NAME "cdt")
set(DESC "Toolchain and supporting tools for the Mandel platform")
set(URL "https://github.com/eosnetworkfoundation/mandel.cdt")
set(EMAIL "support@block.one")
set(DESC "Toolchain and supporting tools for the Leap platform")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use the following description:
Toolchain and supporting tools to facilitate C/C++ development of contracts for Antelope blockchains

What do you think @larryk85?

set(URL "https://github.com/AntelopeIO/cdt")
set(EMAIL "bucky.kittinger@eosnetwork.com")
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_package.sh.in ${CMAKE_BINARY_DIR}/packages/generate_package.sh @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_deb.sh ${CMAKE_BINARY_DIR}/packages/generate_deb.sh COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_bottle.sh ${CMAKE_BINARY_DIR}/packages/generate_bottle.sh COPYONLY)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
eosnetworkfoundation/mandel.cdt
AntelopeIO/cdt

Copyright (c) 2021-2022 EOS Network Foundation (ENF) and its contributors. All rights reserved.
This ENF software is based upon:
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# CDT (Contract Development Toolkit)
## Version : 3.0.0

CDT is a toolchain for WebAssembly (WASM) and a set of tools to facilitate smart contract development for the Mandel platform. In addition to being a general purpose WebAssembly toolchain, [Mandel](https://github.com/eosnetworkfoundation/mandel) specific optimizations are available to support building smart contracts. This new toolchain is built around [Clang 9](https://github.com/eosnetworkfoundation/cdt-llvm), which means that CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are incomplete or not available.
CDT is a toolchain for WebAssembly (WASM) and a set of tools to facilitate smart contract development for the Leap platform, a C++ implementation of the Antelope protocol. In addition to being a general purpose WebAssembly toolchain, [Leap](https://github.com/AntelopeIO/leap) specific optimizations are available to support building smart contracts. This new toolchain is built around [Clang 9](https://github.com/AntelopeIO/cdt-llvm), which means that CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are incomplete or not available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, this paragraph could instead be:

CDT is a C/C++ toolchain targeting WebAssembly (WASM) and a set of tools to facilitate development of smart contracts written in C/C++ that are meant to be deployed to an [Antelope](https://github.com/AntelopeIO/) blockchain.

In addition to being a general purpose WebAssembly toolchain, specific features and optimizations are available to support building Antelope-based smart contracts. 
This new toolchain is built around [Clang 9](https://github.com/AntelopeIO/cdt-llvm), which means that CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are incomplete or not available.

@larryk85


## Binary Releases
CDT currently supports Linux x86_64 Debian packages.
### Debian Package Install
```sh
wget https://github.com/eosnetworkfoundation/mandel.cdt/releases/download/v3.0.0-rc1/cdt_3.0.0-rc1_amd64.deb
wget https://github.com/AntelopeIO/cdt/releases/download/v3.0.0-rc1/cdt_3.0.0-rc1_amd64.deb
sudo apt install ./cdt_3.0.0-rc1_amd64.deb
```
### Debian Package Uninstall
Expand Down Expand Up @@ -41,20 +41,21 @@ export CCACHE_DISABLE=1

### Building Integration Tests

Integration tests require access to a mandel build. Instructions below provide additional steps for using a mandel built from source. For development purposes it is generally advised to use mandel built from source.
Integration tests require access to a Leap build. Instructions below provide additional steps for using a Leap built from source. For development purposes it is generally advised to use Leap built from source.
arhag marked this conversation as resolved.
Show resolved Hide resolved

#### For building integration tests with mandel built from source
#### For building integration tests with Leap built from source

Set an environment variable to tell CDT where to find the Mandel build directory:
Set an environment variable to tell CDT where to find the Leap build directory:

```sh
export eosio_DIR=/path/to/mandel/build/lib/cmake/eosio
export eosio_DIR=/path/to/leap/build/lib/cmake/eosio
export leap_DIR=/path/to/leap/build/lib/cmake/leap
```

### Guided Installation or Building from Scratch
```sh
git clone --recursive https://github.com/eosnetworkfoundation/mandel.cdt
cd mandel.cdt
git clone --recursive https://github.com/AntelopeIO/cdt
cd cdt
mkdir build
cd build
cmake ..
Expand Down Expand Up @@ -109,4 +110,4 @@ sudo rm /usr/local/bin/cdt-*

## License

[MIT](./LICENSE)
[MIT](./LICENSE)
2 changes: 1 addition & 1 deletion docs/02_installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo apt remove cdt
# Guided Installation or Building from Scratch

```sh
git clone --recursive https://github.com/eosnetworkfoundation/mandel.cdt
git clone --recursive https://github.com/AntelopeIO/cdt
cd eosio.cdt
mkdir build
cd build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
content_title: EOSIO.CDT To Mandel.CDT
content_title: EOSIO.CDT To Leap.CDT
arhag marked this conversation as resolved.
Show resolved Hide resolved
---

For this release all of the naming of namespaces and file paths will remain as `eosio`, so no need to migrate away from that with this release.
Expand All @@ -8,4 +8,4 @@ But there are a few differences.

1. The tool names have change prefix. I.e. tools like `eosio-cpp` are now `cdt-cpp`.
2. The cmake toolchain file has changed its name from `EosioWasmToolchain.cmake` to `CDTWasmToolchain.cmake`.
3. The library path for the cmake package and package name have changed. `/usr/local/lib/cmake/eosio.cdt` to `/usr/local/lib/cmake/cdt` and in cmake `find_package(eosio.cdt)` to `find_package(cdt)`.
3. The library path for the cmake package and package name have changed. `/usr/local/lib/cmake/eosio.cdt` to `/usr/local/lib/cmake/cdt` and in cmake `find_package(eosio.cdt)` to `find_package(cdt)`.
6 changes: 3 additions & 3 deletions docs/05_features/10_return_values_from_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ content_title: Return Values From Actions

## Overview

`Mandel` version 3.1 enables you to return any value from any action. This new feature facilitates easier smart contract implementation debugging, and better messaging between a smart contract and its clients. From now on the clients of a smart contract are able to use the value returned by an action, no more string parsing on the client side and no more print statements in the smart contract implementation.
`Leap` version 3.1 enables you to return any value from any action. This new feature facilitates easier smart contract implementation debugging, and better messaging between a smart contract and its clients. From now on the clients of a smart contract are able to use the value returned by an action, no more string parsing on the client side and no more print statements in the smart contract implementation.
arhag marked this conversation as resolved.
Show resolved Hide resolved

## Concept

Expand All @@ -14,7 +14,7 @@ When you implement an action within a smart contract use the `return` statement

The following list provides important details for when you return a value from an action:

* As mentioned above, the `EOSIO` framework does all the heavy lifting for the return value to convey it to the client. The `EOSIO` framework defines and uses a new intrinsic, namely `set_action_return_value`. To learn more about `EOSIO` returned values functionality, refer to its documentation and [implementation](https://github.com/eosnetworkfoundation/mandel.cdt/blob/develop/libraries/native/intrinsics.cpp#L295).
* As mentioned above, the `EOSIO` framework does all the heavy lifting for the return value to convey it to the client. The `EOSIO` framework defines and uses a new intrinsic, namely `set_action_return_value`. To learn more about `EOSIO` returned values functionality, refer to its documentation and [implementation](https://github.com/AntelopeIO/cdt/blob/develop/libraries/native/intrinsics.cpp#L295).
* The CPU time and memory limit of your contract (maximum size of wasm), not RAM or NET, defines the limits of the returned value..
* The action receipt includes a hash of the serialized returned value.
* The action trace includes the serialized returned value.
Expand All @@ -27,5 +27,5 @@ The following list provides important details for when you return a value from a

For a full working example of a smart contract action which returns a value, refer to the following resources:

* The [`hello`](https://github.com/eosnetworkfoundation/mandel.cdt/blob/develop/examples/hello/src/hello.cpp#L14) smart contract example, see action `hello::checkwithrv`.
* The [`hello`](https://github.com/AntelopeIO/cdt/blob/develop/examples/hello/src/hello.cpp#L14) smart contract example, see action `hello::checkwithrv`.
* The [How-to return values from actions](../06_how-to-guides/60_how-to-return-values-from-actions.md).
2 changes: 1 addition & 1 deletion docs/05_features/40_native-tester-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
content_title: Native Tester And Compilation
---

As of v1.5.0 native compilation can be performed and a new set of libraries to facilitate native testing and native "scratch pad" compilation. [`cdt-cc`](../03_command-reference/cdt-cc.md), [`cdt-cpp`](../03_command-reference/cdt-cpp.md) and [`cdt-ld`](../03_command-reference/cdt-ld.md) now support building "smart contracts" and unit tests natively for quick tests to help facilitate faster development \(note the default implementations of a lot of the mandel `intrinsics` are currently asserts that state they are unavailable, these are user definable.\)
As of v1.5.0 native compilation can be performed and a new set of libraries to facilitate native testing and native "scratch pad" compilation. [`cdt-cc`](../03_command-reference/cdt-cc.md), [`cdt-cpp`](../03_command-reference/cdt-cpp.md) and [`cdt-ld`](../03_command-reference/cdt-ld.md) now support building "smart contracts" and unit tests natively for quick tests to help facilitate faster development \(note the default implementations of a lot of the Leap `intrinsics` are currently asserts that state they are unavailable, these are user definable.\)
arhag marked this conversation as resolved.
Show resolved Hide resolved

## Getting Started
Once you have your smart contract written then a test source file can be written.
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# EOSIO.CDT (Contract Development Toolkit)

EOSIO.CDT is a toolchain for WebAssembly (WASM) and set of tools to facilitate smart contract development for the EOSIO platform. In addition to being a general purpose WebAssembly toolchain, [Mandel](https://github.com/eosnetworkfoundation/mandel) specific optimizations are available to support building EOSIO smart contracts. This new toolchain is built around [Clang 9](https://github.com/eosnetworkfoundation/cdt-llvm), which means that EOSIO.CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are incomplete or not available.
EOSIO.CDT is a toolchain for WebAssembly (WASM) and set of tools to facilitate smart contract development for the EOSIO platform. In addition to being a general purpose WebAssembly toolchain, [Leap](https://github.com/AntelopeIO/leap) specific optimizations are available to support building EOSIO smart contracts. This new toolchain is built around [Clang 9](https://github.com/AntelopeIO/cdt-llvm), which means that EOSIO.CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are incomplete or not available.
arhag marked this conversation as resolved.
Show resolved Hide resolved

## Upgrading

There's been a round of braking changes, if you are upgrading from an older version please read [Upgrading CDT to Mandel](./04_upgrading/eosio.cdt-to-mandel.cdt.md).
There's been a round of breaking changes, if you are upgrading from an older version please read [Upgrading CDT to Leap](./04_upgrading/eosio.cdt-to-leap.cdt.md).
arhag marked this conversation as resolved.
Show resolved Hide resolved

## Contributing

See the [Contributing Guide](https://github.com/eosnetworkfoundation/mandel/blob/main/CONTRIBUTING.md)
See the [Contributing Guide](https://github.com/eosnetworkAntelopeIO/leap/blob/main/CONTRIBUTING.md)
arhag marked this conversation as resolved.
Show resolved Hide resolved

## License

Expand Down
6 changes: 3 additions & 3 deletions modules/TestsExternalProject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ExternalProject_Add(
CDTWasmTests
SOURCE_DIR "${CMAKE_SOURCE_DIR}/tests/unit"
BINARY_DIR "${CMAKE_BINARY_DIR}/tests/unit"
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_BINARY_DIR}/lib/cmake/cdt/CDTWasmToolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCDT_BIN=${CMAKE_BINARY_DIR}/lib/cmake/cdt/ -DBASE_BINARY_DIR=${CMAKE_BINARY_DIR} -D__APPLE=${APPLE} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -Dmandel_DIR=${mandel_DIR}
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_BINARY_DIR}/lib/cmake/cdt/CDTWasmToolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCDT_BIN=${CMAKE_BINARY_DIR}/lib/cmake/cdt/ -DBASE_BINARY_DIR=${CMAKE_BINARY_DIR} -D__APPLE=${APPLE} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -Dleap_DIR=${leap_DIR}
arhag marked this conversation as resolved.
Show resolved Hide resolved
UPDATE_COMMAND ""
PATCH_COMMAND ""
TEST_COMMAND ""
Expand Down Expand Up @@ -41,5 +41,5 @@ if (eosio_FOUND)
BUILD_ALWAYS 1
)
else()
message(STATUS "mandel package not found, skipping building integration tests")
endif()
message(STATUS "Leap package not found, skipping building integration tests")
arhag marked this conversation as resolved.
Show resolved Hide resolved
endif()