Repolode
TokTok

TokTok/c-toxcore

C implementation of the Tox protocol, a serverless peer-to-peer library for encrypted instant messaging built on libsodium.

Open-source alternative to:SkypeWhatsApp

Stars
2,698
Forks
311
Open issues
220
Last commit
14 hours ago

What is it?

c-toxcore is the core C library behind the Tox messenger. Tox is a peer-to-peer instant messaging system with no central server, aiming to make security and privacy easy for ordinary users. Encryption and authentication are handled by libsodium, which is based on NaCl.

The library exposes a C API (tox.h) built around an event loop: applications create a Tox instance, register callbacks for events such as incoming friend requests or messages, and call tox_iterate at a regular interval. The repository includes an echo bot example that walks through this flow. When libvpx and opus are installed, the build also includes an A/V library for audio and video calls.

The project is labeled experimental and has not been formally audited by an independent cryptography firm, so the README asks users to take the risk themselves. The build uses CMake and requires git submodules to be initialized.

Key features

  • 01Serverless peer-to-peer messaging with no central server required
  • 02Encryption and authentication provided by libsodium
  • 03C API driven by callbacks and a polling event loop
  • 04Echo bot example for getting started
  • 05Optional A/V calling when libvpx and opus are present
  • 06Built with CMake

Use cases

  • Building a Tox client or chat application in C
  • Writing a bot that accepts friend requests and responds to messages
  • Adding peer-to-peer encrypted messaging to a project without a central server
  • Studying a serverless messaging protocol implementation

Quick start

  1. 1

    Install libsodium (required dependency)

  2. 2

    Clone the repo with submodules

    git clone --recurse-submodules https://github.com/Toktok/c-toxcore
  3. 3

    Create a build directory and configure with CMake

    mkdir _build && cd _build && cmake ..
  4. 4

    Build and install the library

    make && sudo make install

Things to know

  • The library is explicitly experimental and has not been independently audited for cryptographic security.
  • The security model is not yet fully specified, so use it at your own risk.
  • Building requires initializing git submodules before compiling.

In collections

Topics

FAQ

What is c-toxcore?
C implementation of the Tox protocol, a serverless peer-to-peer library for encrypted instant messaging built on libsodium. c-toxcore is the core C library behind the Tox messenger. Tox is a peer-to-peer instant messaging system with no central server, aiming to make security and privacy easy for ordinary users. Encryption and authentication are handled by libsodium, which is based on NaCl.
Is c-toxcore free to use? What license does it have?
c-toxcore is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is c-toxcore still maintained?
Actively maintained. The last commit to c-toxcore was on Nov 6, 2026.
What can I use c-toxcore for?
Building a Tox client or chat application in C Writing a bot that accepts friend requests and responds to messages Adding peer-to-peer encrypted messaging to a project without a central server Studying a serverless messaging protocol implementation
How do I install c-toxcore?
Install libsodium (required dependency) Clone the repo with submodules: git clone --recurse-submodules https://github.com/Toktok/c-toxcore Create a build directory and configure with CMake: mkdir _build && cd _build && cmake .. Build and install the library: make && sudo make install
Where can I get c-toxcore?
The source code and installation instructions are on GitHub: https://github.com/TokTok/c-toxcore

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects