Provides pre-built binaries for compiling TON FunC and Tact smart contracts to Fift and BOC (Bag of Cells) output. Version 2.3.0 supports FunC 0.4.4+ and Tact 1.3.0. Distributed as a npm package wrapping native binaries for major platforms (Linux, macOS, Windows). Updated quarterly alongside TON compiler releases. Key differentiator: eliminates need to manually download or build TON compilers; integrates seamlessly with JavaScript/TypeScript tooling like Blueprint or Tact boilerplate.
npm install ton-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a minimal FunC contract to BOC and prints its hash.
Use compile instead of compileFunc; pass an object with targets and sources.
Set HTTP_PROXY/HTTPS_PROXY environment variables, or manually download and place binary in node_modules/ton-compiler/bin/.
Run npx ton-compiler postinstall or npm rebuild ton-compiler. If still fails, check platform support (linux-x64, darwin-arm64, etc.).
Upgrade Node.js to version 18 or later.
Install: npm install ton-compiler
Run: npx ton-compiler postinstall. If unsupported, manually add binary or use Docker.
Use named import: import { compile } from 'ton-compiler'