Toit standard libraries

Welcome to the standard libraries for the Toit programming language. The Toit SDK contains a vast amount of libraries, ready-to use classes and functionalities that allow a fast and easy use of Toit. This documentation contains the structure of the Toit libraries.

Except for the core library, you must import a library before you can use it. Here is an example of how to do it:

import io
import encoding.json
import net.tcp as net
import uuid show *
import fixed-point show FixedPoint

Fundamental

math
Mathematical functions and constants.
monitor
Synchronization primitives for coordinating and communicating between tasks.
log
Logging support.
system
System related functionality.
io
The Toit IO library.
crypto
Cryptographic functions.
core
The Toit core library.

Framework

i2c
I2C is a serial communication bus able to address multiple devices along the same 2-wire bus.
uuid
Support for universally unique identifiers (UUIDs).
device
Functionality available on devices (ESP32).
expect
Utilities for expressing expectations in tests.
gpio
Support for General Purpose Input/Output (GPIO) pins.

Misc

bytes
Utilities to build and use binary data.
pulse-counter
Support for the ESP32 pulse counter (PCNT).
bitmap
Low level operations for manipulating byte arrays as images.
rmt
Support for the ESP32 Remote Control (RMT).
i2s
I2S Serial communication Bus.
reader-writer
Support for inter task reading and writing.
spi
SPI is a serial communication bus able to address multiple devices along a main 3-wire bus with an additional 1 wire per device.
statistics
Statistics utilities.
binary
Support for byte-order aware manipulation of byte arrays.
tls
TLS support.
esp32
ESP32 related functionality.

Packages

Additional libraries are distributed as packages. You can find them at pkg.toit.io.