Precompiled binaries
You no longer need to manually install binaries with Blueprint SDK.
All binaries for development and testing are provided with the Blueprint SDK.
Migrate to Blueprint SDK
Precompiled binaries
If you don't use Blueprint SDK for smart contracts development, you can use precompiled binaries for your operating system and tool of choice.
Prerequisites
For the local development of TON smart contracts without Javascript, you need to prepare binaries of func
, fift
, and lite client
on your device.
You can download and set them up below, or read this article from TON Society:
1. Download
Download the binaries from the table below. Make sure to select the correct version for your operating system and to install any additional dependencies:
OS | TON binaries | fift | func | lite-client | Additional dependencies |
---|---|---|---|---|---|
MacOS x86-64 | download | download | download | download | |
MacOS arm64 | download | brew install openssl ninja libmicrohttpd pkg-config | |||
Windows x86-64 | download | download | download | download | Install OpenSSL 1.1.1 |
Linux x86_64 | download | download | download | download | |
Linux arm64 | download | sudo apt install libatomic1 libssl-dev |
2. Setup your binaries
- Windows
- Linux / MacOS
After downloading, you need to
create
a new folder. For example:C:/Users/%USERNAME%/ton/bin
and move the installed files there.To open the Windows environment variables, press the Win + R buttons on the keyboard, type
sysdm.cpl
, and press Enter.On the "Advanced" tab, click the "Environment Variables..." button.
In the "User variables" section, select the "Path" variable and click "Edit" (this is usually required).
To add a new value
(path)
to the system variable in the next window, click the button "New". In the new field, you need to specify the path to the folder where the previously installed files are stored:C:\Users\%USERNAME%\ton\bin\
To check whether everything was installed correctly, run in terminal (cmd.exe):
fift -V -and func -V -and lite-client -V
If you plan to use fift, you need
FIFTPATH
environment variable with the necessary imports:- Download fiftlib.zip
- Open the zip in some directory on your machine (like
C:/Users/%USERNAME%/ton/lib/fiftlib
) - Create a new (click button "New") environment variable
FIFTPATH
in "User variables" section. - In the "Variable value" field, specify the path to the files:
/%USERNAME%/ton/lib/fiftlib
and click OK. Done.
Instead of the %USERNAME%
keyword, you must insert your own username
.
After downloading, make sure the downloaded binaries are executable by changing their permissions.
chmod +x func
chmod +x fift
chmod +x lite-clientIt's also useful to add these binaries to your path (or copy them to
/usr/local/bin
) so you can access them from anywhere.cp ./func /usr/local/bin/func
cp ./fift /usr/local/bin/fift
cp ./lite-client /usr/local/bin/lite-clientTo check that everything was installed correctly, run in terminal.
fift -V && func -V && lite-client -V
If you plan to
use fift
, also download fiftlib.zip, open the zip in some directory on your device (like/usr/local/lib/fiftlib
), and set the environment variableFIFTPATH
to point to this directory.unzip fiftlib.zip
mkdir -p /usr/local/lib/fiftlib
cp fiftlib/* /usr/local/lib/fiftlib
Remember to set the environment variable FIFTPATH
to point to this directory.
Build from source
If you don't want to rely on pre-compiled binaries and prefer to compile the binaries yourself, you can follow the official instructions.
The ready-to-use gist instructions are provided below:
Linux (Ubuntu / Debian)
sudo apt update
sudo apt install git make cmake g++ libssl-dev zlib1g-dev wget
cd ~ && git clone https://github.com/ton-blockchain/ton.git
cd ~/ton && git submodule update --init
mkdir ~/ton/build && cd ~/ton/build && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j 4
Other sources for binaries
The core team provides automatic builds for several operating systems as GitHub Actions.
Click on the link above, choose the workflow on the left relevant to your operating system, click on a recent green passing build, and download ton-binaries
under "Artifacts".