cesanta/v7 logo

cesanta/v7

Free

Embedded JavaScript engine for C/C++

FreeFree tier
Type
Open Source
Company
Cesanta

About cesanta/v7

V7 is an embedded JavaScript engine written in C, designed specifically for Internet of Things (IoT) and embedded systems. It implements the JavaScript 5.1 standard and is optimized for minimal resource consumption: compiled static size ranges from 40k to 120k, and RAM footprint is approximately 800 bytes when using the freeze feature (15k without). The engine is cross-platform, running on anything from Arduino to MS Windows, and provides a simple C/C++ API that makes it easy to export existing C/C++ functions into JavaScript. It includes an auxiliary library offering hardware (SPI, UART), file, crypto, and network APIs. Integration is straightforward — just copy the two files v7.h and v7.c into your project. V7 is part of the Mongoose OS platform. Note: this project is deprecated in favor of Cesanta's mjs.

Key Features

Cross-platform: works on anything from Arduino to MS Windows
Small size: compiled static size 40k-120k, RAM ~800 bytes with freeze feature
Simple and intuitive C/C++ API for exporting native functions to JavaScript
Implements JavaScript 5.1 standard
Auxiliary library with Hardware (SPI, UART), File, Crypto, and Network APIs
Source code is both ISO C and ISO C++ compliant
Easy integration: just copy v7.h and v7.c into your project
Part of the full stack Mongoose OS Platform

Pros & Cons

Pros
  • Extremely small memory footprint suitable for low-resource microcontrollers
  • Easy to integrate with only two source files needed
  • Cross-platform support from Arduino to desktop Windows
  • Familiar JavaScript 5.1 syntax for embedded development
  • Includes useful auxiliary libraries for hardware, crypto, and networking
  • Open source under GPL v2 with commercial licensing available
Cons
  • Project is deprecated in favor of Cesanta's mjs (no further development)
  • Only implements JavaScript 5.1, lacking ES6+ features
  • Last release was in May 2016 - no active maintenance
  • Without freeze feature, RAM footprint is 15k which may be high for very constrained MCUs

Best For

Programming Internet of Things (IoT) embedded devices in JavaScriptAdding scripting capabilities to resource-constrained systems (Arduino, STM32, etc.)Prototyping embedded applications before commercializationEmbedded software development leveraging JavaScript for rapid iteration

FAQ

Is V7 still actively maintained?
No, V7 is deprecated. The project has been superseded by Cesanta's mjs (https://github.com/cesanta/mjs).
What license does V7 use?
V7 is released under GNU GPL v2 open source license. Commercial licenses without GPL restrictions are available upon request.
How do I integrate V7 into my project?
Simply copy the two files v7.h and v7.c into your project and compile them along with your code.
What platforms are supported?
V7 is cross-platform and works on any system with a C/C++ compiler, from Arduino to MS Windows.