Ferrett logo

Ferrett

Free

Ferret is a free software Clojure implementation for real time embedded control systems.

FreeFree tier
Type
Open Source

About Ferrett

Ferret is a free and open-source Lisp implementation designed specifically for real-time embedded control systems. It compiles Ferret Lisp source code into self-contained C++11 code, which can run on any platform with a C++11-compliant compiler, from microcontrollers with as little as 2KB of RAM to general-purpose computers. Key features include deterministic execution for real-time applications, immutable data structures, functional macros, an easy foreign function interface (FFI) for inline C/C++, memory pooling to operate without heap allocation, and a module system. Ferret supports a wide range of hardware, including Arduino boards, Raspberry Pi, ESP8266, and various ARM and AVR microcontrollers, making it suitable for IoT, robotics, and automation projects.

Key Features

Tailored for Real Time Control Applications (Deterministic Execution)
Immutable Data Structures
Functional Macros
Easy FFI (Inline C, C++)
Easily Embeddable (Ferret functions are C++ functors)
Memory Pooling (Ability to run without heap memory)
Destructuring
Module System
Portable across any OS or MCU with C++11 compiler
Compiles to self-contained C++11 code

Pros & Cons

Pros
  • Deterministic execution suitable for hard real-time applications
  • Runs on extremely resource-constrained devices (as low as 2KB RAM)
  • Memory pooling allows operation without dynamic heap allocation
  • Seamless integration with existing C and C++ code via inline FFI
  • Portable across a wide range of architectures and operating systems
  • Functional and expressive Lisp syntax with macros and immutable data
Cons
  • Small community and limited third-party libraries compared to mainstream languages
  • Documentation is primarily a technical manual, may lack tutorials for beginners
  • Requires familiarity with Lisp-like syntax which has a learning curve
  • Compiled C++ code may have overhead compared to hand-tuned C for extreme optimization

Best For

Real-time embedded control systemsInternet of Things (IoT) devicesRobotics and automationSensor data processing and controlArduino and Raspberry Pi projectsLow-level hardware interaction with high-level language

FAQ

What hardware does Ferret support?
Ferret supports any hardware with a C++11-compliant compiler, including Arduino boards (Uno, Due, 101, Teensy, etc.), Raspberry Pi, ESP8266, NodeMcu, and general-purpose computers running Linux, macOS, or Windows.
Is Ferret free and open source?
Yes, Ferret is free software released under an open-source license. Prebuilt and source code distributions are available from the official website.
How does Ferret achieve real-time performance?
Ferret is designed for deterministic execution, meaning its behavior is predictable in time. It also offers memory pooling to avoid heap allocation, which helps avoid runtime latency spikes.
Can I use C or C++ libraries with Ferret?
Yes, Ferret provides an easy foreign function interface (FFI) that allows inline C and C++ code directly in Ferret source, making it simple to interface with existing libraries.