Library / SDK
toitlang/toit avatar
toitlang/toit

Toit Programming Language for ESP32 Applications

Program your microcontrollers in a fast and robust high-level language.

1,407 stars91 forksToitLGPL-2.1

At a glance

What is it?
Toit is an open source language implementation for programming ESP32 devices, combining a compiler, virtual machine, standard libraries, and a development path aimed at connected hardware. The main tradeoff is that installation and hardware support depend on the selected platform and build route.
Who is it for?
Toit fits developers who want to build ESP32 applications in a high-level language and can accept its platform-specific setup and evolving release line. It is less suitable for teams that need a single installation path across every operating system or a fully documented build for every target.
Can I use it commercially?
Yes, with conditions. LGPL-2.1 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Toit, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Toit for ESP32 firmware development

Toit addresses the problem of writing embedded applications for ESP32 microcontrollers without relying entirely on lower-level implementation details. The repository contains the language implementation itself, including the compiler, virtual machine, and standard libraries. Its documented target is ESP32 hardware, and the example directory includes programs for GPIO, I2C, UART, Wi-Fi, Ethernet, HTTP, deep sleep, BLE, ESP-NOW, RSA generation, and service-oriented features.

The intended users are developers building device software and drivers who want to work in a language designed around a higher-level programming model. The README also points to platform documentation for language basics and standard libraries, plus a package registry for published packages. This makes Toit a broader development environment rather than a single library for one hardware peripheral.

The repository is not archived, and its last push was on 2026-10-15. The listed release history includes ec618-base-v5 and two v2.0.0 alpha releases, so users should pay attention to which version they select when building or deploying a device.

Compiler, VM, and libraries in one repository

The architecture is explicit in the repository layout. `src/` contains implementation sources, `include/` contains public or included interfaces, `lib/` contains standard libraries, `examples/` contains runnable Toit programs, and `system/` contains system-related code. The root `CMakeLists.txt`, `CMakePresets.json`, and `Makefile` coordinate builds across the implementation and its supporting pieces.

Toit programs are compiled before execution, while the virtual machine supplies the runtime environment for the resulting programs. The repository also includes toolchains, tests, third-party directories, ESP32 support files, and build scripts. This is a substantial implementation project rather than a thin wrapper around existing C or C++ APIs.

The build requires more than a Toit compiler. On Linux and Mac, the documented requirements include GNU Make, CMake, Ninja, GCC, Go, python-is-python3 on Ubuntu, and optionally glibc-tools on newer Ubuntu releases. The Toit VM also has an ESP-IDF requirement. For Linux and ESP32 builds, the project recommends Toitware's ESP-IDF fork because it includes changes to the custom allocator, UART allocation fixes, and lwIP fixes.

Jaguar as the fastest documented ESP32 setup

For ESP32 development, the README recommends Jaguar, a separate Toit ecosystem tool. Jaguar downloads the Toit SDK automatically, so it removes the need to manually assemble the language toolchain before the first device workflow. It also supports watching a source file and installing extra drivers or services.

After Jaguar is set up, the documented development loop is one command. `jag watch` updates and restarts the ESP32 application while the source file is watched. The README describes this as a way to develop, update, and restart applications in less than two seconds, but the repository does not provide timing measurements or deployment results beyond that stated claim.

Jaguar also provides a service installation path. The example below installs an NTP-based time synchronization service for an example program. This matters because it shows that the intended architecture can compose reusable services around an application instead of requiring every time-synchronization detail to be written inside one program.

Installing Toit on Linux, Windows, and macOS

Installation depends on the operating system. The README says Arch Linux variants can use an AUR helper and provides the `toit` package example. Other Linux distributions are directed to the release page for a `tar.gz` file because the README does not document packages for them. macOS users are directed to a DMG or `tar.gz` release because Homebrew support is described as pending.

On Arch Linux, the documented installation command is:

sh
yay -S toit

The README says to use an AUR helper, so the exact helper can vary. On Windows 10 or later, the documented package-manager command is:

sh
winget install --id=Toit.Toit -e

The README also gives an upgrade command:

sh
winget upgrade --id=Toit.Toit -e

These commands install the language package but do not configure an editor, select an ESP32 port, or create a firmware image. The README explicitly says that its installation instructions do not cover IDE integration.

First device use through Jaguar

A first real ESP32 workflow starts by obtaining Jaguar through its own setup process. The repository README gives no installation command for Jaguar itself, so the exact installation sequence must come from the Jaguar project. Once Jaguar is configured, the documented command for the repository's example is:

sh
jag watch examples/hello.toit

This starts the development loop for `examples/hello.toit`. The reader should expect Jaguar to use the Toit SDK it downloads, communicate with the connected ESP32, and apply source changes. The README does not state the required serial port setting for this first command, so it would be incorrect to add one.

A second documented operation adds an NTP service:

sh
jag container install ntp examples/ntp/ntp.toit

That command demonstrates service management, but it is not a replacement for the initial application workflow. For host-side development, the README points to separate host instructions. The repository also supports direct source builds, which are more involved and require the ESP-IDF and platform toolchain setup described below.

Building from a source checkout

A source build is the fallback for Linux and Mac users who need to compile the implementation rather than install a package. The documented dependency installation for apt-capable Linux distributions is:

sh
sudo apt install build-essential cmake ninja-build golang

After checking out the repository, initialize its submodules and run the build:

sh
git submodule update --init --recursive
make

The build system uses Bash, defaults to a `build` directory, and defaults to a `Release` build for the host target. Its variables expose separate concepts for the build directory, host, build type, target, and toolchain. The Makefile also contains ESP32-specific variables, including `ESP32_CHIP`, `ESP32_PORT`, `ESP32_SYSTEM_ENTRY`, and `ESP32_ENTRY`.

The source build is therefore not just a compiler invocation. It is a repository-aware build involving submodules, Go tooling, CMake, Ninja, GCC, and ESP-IDF. The README says that ESP32-specific requirements may depend on host architecture and refers readers to the other-platform documentation for RISC-V, ARM32, and ARM64 targets.

Limitations, licensing, and upgrade choices

The clearest limitation is platform-specific setup. Arch Linux has a documented package route, Windows has a `winget` package, other Linux distributions and macOS require release artifacts, and source builds require a larger toolchain. The README does not document a universal installer, a macOS Homebrew package, or complete IDE integration steps.

The release line also requires attention. The repository lists `v2.0.0-alpha.198`, `v2.0.0-alpha.199`, and `ec618-base-v5`, but the README does not explain compatibility guarantees between them. Jaguar can download a Toit SDK automatically, yet the repository does not state which SDK version Jaguar selects for a particular device project. Users building firmware should therefore document the language version and target configuration they choose.

Licensing is divided by component. The compiler, virtual machine, and supporting infrastructure use LGPL-2.1. Standard libraries under `lib/` use MIT, examples under `examples/` use 0BSD, and named subdirectories may have their own licenses. These are project-specific license facts, not legal advice. Review the applicable `LICENSE` files before redistributing a particular build or dependency.

Editorial conclusion

Toit fits developers who want to build ESP32 applications in a high-level language and can accept its platform-specific setup and evolving release line. It is less suitable for teams that need a single installation path across every operating system or a fully documented build for every target. Verify the Jaguar workflow, target ESP32 configuration, required build dependencies, and the intended version first.

Frequently asked questions

How do I install Toit on Windows 10 or later?

The README documents Windows installation through Windows Package Manager with `winget install --id=Toit.Toit -e`. The repository also documents `winget upgrade --id=Toit.Toit -e` for upgrades. Editor integration is covered separately.

What does Jaguar do for ESP32 development?

According to the README, Jaguar automatically downloads the Toit SDK and supports developing, updating, and restarting ESP32 applications with `jag watch`. It can also install reusable drivers and services.

Can I build Toit from source on Linux?

Yes. The documented source-build commands are `git submodule update --init --recursive` followed by `make`. The build also requires tools including CMake, Ninja, GCC, Go, and the ESP-IDF setup described in the README.

Official sources

  1. License: LGPL-2.1
  2. Project website
  3. README
  4. Releases
  5. toitlang/toit on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/toitlang-toit.svg)](https://hysenlabs.com/projects/toitlang-toit)

Was this useful?