eoscdt project
Project description
CDT Release with Python Wheel Package
EOSCDT
Installation
Linux & MacOS X
python3 -m pip install -U eoscdt
eoscdt check
Windows
python -m pip install -U eoscdt
eoscdt check
Quick start
cdt-init --project hello
cd hello
mkdir build
cd build
cmake -Dcdt_DIR=`cdt-get-dir` -G"Unix Makefiles" ..
make -j$(nproc)
If everything goes well, you will find hello.wasm and hello.abi in your build/hello directory.
About Windows
Setup MSYS2 Development Environment
It's recommended to use msys2 as a build environment.
After installation, click start
button on the Windows taskbar, search for msys2 clang64
and open it.
Then run the following command to install dependencies.
pacman --noconfirm -S git
pacman --noconfirm -S --needed base-devel mingw-w64-clang-x86_64-clang
pacman --noconfirm -S mingw-w64-clang-x86_64-gdb mingw-w64-clang-x86_64-compiler-rt
pacman --noconfirm -S mingw-w64-clang-x86_64-boost
pacman --noconfirm -S mingw-w64-clang-x86_64-cmake
pacman --noconfirm -S mingw-w64-clang-x86_64-python
pacman --noconfirm -S mingw-w64-clang-x86_64-python-pip
Finally, install eoscdt
python -m pip install -U eoscdt
eoscdt check
If you are using Visual Studio Code as an IDE, you can use msys2 bash as your terminal.
search for Preferences: Open User Settings(JSON)
and open it. Add the following configuration for msys2
"terminal.integrated.env.windows": {
"MSYSTEM": "CLANG64",
"CHERE_INVOKING": "1",
"MSYS2_PATH_TYPE": "inherit",
"LIBRARY_PATH": "/clang64/lib"
},
"terminal.integrated.profiles.windows": {
"msys2": {
"path": "G:\\msys64\\usr\\bin\\bash.exe",
"args": ["--login", "-i"]
}
}
Change G:\\msys64\\usr\\bin\\bash.exe
to the location of bash.exe you installed.
For more details, please see Terminal Profiles
Official Python Development Environment
If you have downloaded and installed python from official python website, don't forget to enable Add Python to environment variables
option during the installation, otherwise cmd.exe will have problem finding executable programs of CDT.
Launch cmd.exe to install eoscdt, cmake and ninja
pip install -U eoscdt
eoscdt check
pip install cmake
pip install ninja
Also you need to change project(xxx)
to project(xxx NONE)
in your CMakeLists.txt to pass the compiler checking if you didn't install other compiler such as Visual Studio on your Windows.
Here is a minimal steps about building smart contracts with only cmake and ninja installed
cdt-init --project hello
add project(hello NONE)
to CMakeLists.txt
get the cdt directory
cdt-get-dir
mkdir build
cd build
cmake -Dcdt_DIR="cdt dir output by the previous step" -GNinja ..
ninja
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file eoscdt-0.1.7.tar.gz
.
File metadata
- Download URL: eoscdt-0.1.7.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f2554778436384831458ca000c21f5859cdbf0ed2fff1bb801fa363962eae56 |
|
MD5 | d6db5df6e1bfc15db737c6e35b31f45b |
|
BLAKE2b-256 | 61a7e25474e28f7136c636cc407fc189bf2843b449f308a599cd988b01ff9c7a |