Skip to main content

Installation

Javascript SDK

You no longer need to manually install binaries.

All binaries for development and testing are provided with the packages:

Precompiled binaries

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:

OSTON binariesfiftfunclite-clientAdditional dependencies
MacOS x86-64downloaddownloaddownloaddownload
MacOS arm64downloadbrew install openssl ninja libmicrohttpd pkg-config
Windows x86-64downloaddownloaddownloaddownloadInstall OpenSSL 1.1.1
Linux x86_64downloaddownloaddownloaddownload
Linux arm64downloadsudo apt install libatomic1 libssl-dev

2. Setup your binaries

  1. After downloading, you need to create a new folder. For example: C:/Users/%USERNAME%/ton/bin and move the installed files there.

  2. To open the Windows environment variables, press the Win + R buttons on the keyboard, type sysdm.cpl, and press Enter.

  3. On the "Advanced" tab, click the "Environment Variables..." button.

  4. In the "User variables" section, select the "Path" variable and click "Edit" (this is usually required).

  5. 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\
  6. To check whether everything was installed correctly, run in terminal (cmd.exe):

    fift -V -and func -V -and lite-client -V
  7. If you plan to use fift, you need FIFTPATH environment variable with the necessary imports:

    1. Download fiftlib.zip
    2. Open the zip in some directory on your machine (like C:/Users/%USERNAME%/ton/lib/fiftlib)
    3. Create a new (click button "New") environment variable FIFTPATH in "User variables" section.
    4. In the "Variable value" field, specify the path to the files: /%USERNAME%/ton/lib/fiftlib and click OK. Done.
important

Instead of the %USERNAME% keyword, you must insert your own username.

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".