Prerequisites for Using Acton with TON: Complete Setup Guide
To use Acton with TON, install the Rust toolchain (stable), Node.js ≥16, OpenSSL development headers, and configure access to a TON RPC endpoint; Bun and Python 3 are optional but recommended for UI development and CI workflows.
Acton is a Rust-based command-line tool for interacting with The Open Network (TON) blockchain, complemented by a web UI built with Vite and React. Before building the ton-blockchain/acton repository or executing transactions against TON networks, your workstation must satisfy specific system dependencies ranging from compilers to blockchain access points.
Core System Requirements
Rust Toolchain (Stable)
Acton's core implementation resides in src/*.rs and is orchestrated by Cargo.toml at the repository root. You need the Rust toolchain (rustc, cargo, and rustup) installed to compile the binary and manage the crate dependencies including tokio, reqwest, and serde.
Standard installation via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
Node.js and Bun (for Web UI)
The repository includes a web interface defined in package.json and configured via bunfig.toml and bun.lock. While Node.js ≥16 (LTS) satisfies the baseline requirement for the Vite/React frontend, the justfile commands expect Bun for installing UI dependencies and launching the development server.
Install Node.js via nvm:
nvm install --lts
nvm use --lts
Then install Bun:
curl -fsSL https://bun.sh/install | bash
OpenSSL Development Headers
Several native Rust crates—specifically reqwest and tokio-tls declared in Cargo.toml—link against OpenSSL (or LibreSSL) for TLS connectivity. Ensure your system provides the development headers (libssl-dev on Debian/Ubuntu, openssl-devel on RHEL/Fedora).
TON-Specific Prerequisites
TON RPC Endpoint Access
The TonClient implementation in src/http.rs issues JSON-RPC calls to fetch account states, blocks, and transaction logs. You must have network access to a TON RPC endpoint, whether that is a public testnet URL (https://testnet.ton.dev), a mainnet provider, or a local validator node you control.
Export the endpoint before running Acton:
export TON_RPC=https://testnet.ton.dev
TON Libraries and Grammar Parsers
Acton depends on internal crates located in the crates/ directory, including crates/tvm-logs/ for parsing TVM execution logs and crates/tree-sitter-tlb/ for TL-B grammar parsing. While these build automatically with Cargo, they expect the underlying TON data structures and VM specifications available in the source tree, fetched via Git submodules.
Git and Submodules
The repository references third-party grammars and test data through Git submodules (.gitmodules). Clone with submodules to ensure all parsers and bindings compile correctly:
git clone https://github.com/ton-blockchain/acton.git
cd acton
git submodule update --init --recursive
Optional Dependencies
Python 3 for CI and Development
While not required for runtime usage, Python 3 is invoked by CI scripts defined in .github/workflows/build.yml for test generation and automation tasks. Install Python 3 only if you intend to contribute to the codebase or run advanced integration tests.
Step-by-Step Installation
Follow this sequence to move from prerequisites to a running acton binary:
-
Install the Rust toolchain and set the default to stable.
-
Install Node.js ≥16 and Bun (optional but matches repository scripts).
-
Install OpenSSL development headers for your OS.
-
Clone the repository and initialize submodules.
-
Install UI dependencies:
bun install # Falls back to npm install if Bun is unavailable
- Build the release binary:
cargo build --release
This produces ./target/release/acton.
Verifying Your Setup
Test the compilation by querying an account on TON testnet:
export TON_RPC=https://testnet.ton.dev
./target/release/acton get-account --address EQC...
To verify the web UI stack, launch the development server:
bun dev # Starts Vite at http://localhost:5173
For programmatic usage, instantiate TonClient from src/http.rs in your Rust code:
use acton::http::TonClient;
#[tokio::main]
async fn main() -> Result<(), acton::error::Error> {
let client = TonClient::new("https://testnet.ton.dev");
let account = client.get_account("EQC...").await?;
println!("{:?}", account);
Ok(())
}
Summary
- Rust (stable) is mandatory for compiling the Acton CLI and its native dependencies defined in
Cargo.toml. - Node.js ≥16 is required for the web UI, with Bun recommended to match the repository's
justfilescripts andbunfig.tomlconfiguration. - OpenSSL development headers enable TLS connections from
reqwestandtokio-tlscrates. - Git with submodule support fetches TON-specific grammars in
crates/tree-sitter-tlb/and TVM log parsers incrates/tvm-logs/. - TON RPC endpoint configuration (mainnet or testnet) is required at runtime for the
TonClientinsrc/http.rsto function. - Python 3 is optional and only needed for CI scripting per
.github/workflows/build.yml.
Frequently Asked Questions
Do I need to run a local TON validator to use Acton?
No. Acton connects to remote RPC endpoints. You can use public testnet URLs like https://testnet.ton.dev or any commercial TON node provider without hosting your own validator.
Can I use npm instead of Bun for the Acton UI?
Yes. While the justfile and bunfig.toml optimize for Bun, the package.json supports standard npm workflows. Run npm install and npm run dev as fallbacks if Bun is not installed.
What version of Rust is required to compile Acton?
The repository targets the stable Rust toolchain. Set this via rustup default stable before building. Specific edition requirements are declared in the [package] section of Cargo.toml.
Is Python 3 required for running Acton or just for development?
Python 3 is only required for development and CI tasks referenced in .github/workflows/build.yml. End-users running the compiled binary or web UI do not need Python installed.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →