# @mikrojs/firmware

> Mikro.js ESP32 firmware: ESP-IDF component, build tools, and project template

Latest version **0.22.0** (published 2026-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mikrojs/firmware
pnpm add @mikrojs/firmware
yarn add @mikrojs/firmware
bun add @mikrojs/firmware
```

Provides the command `mikro-fw`.

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.22.0 |
| Published | 2026-09-30 |
| First published | 2026-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=24.0.0 |
| Dependencies | 6 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 16 |
| Author | Bjørge Næss <bjoerge@gmail.com> |
| Maintainers | bjoerge |
| Keywords | esp-idf, esp32, firmware, mikrojs |

## Links

- npm: https://www.npmjs.com/package/@mikrojs/firmware
- Repository: https://github.com/mikrojs/mikro
- Homepage: https://github.com/mikrojs/mikro#readme
- Issues: https://github.com/mikrojs/mikro/issues
- npm.io page: https://npm.io/package/@mikrojs/firmware

## Dependencies (6)

- [esbuild](https://npm.io/package/esbuild.md) ^0.28.2
- [@optique/run](https://npm.io/package/@optique/run.md) ^1.2.5
- [@optique/core](https://npm.io/package/@optique/core.md) ^1.2.5
- [@mikrojs/native](https://npm.io/package/@mikrojs/native.md) 0.22.0
- [@mikrojs/schema](https://npm.io/package/@mikrojs/schema.md) 0.22.0
- [@mikrojs/quickjs](https://npm.io/package/@mikrojs/quickjs.md) 0.22.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.22.0 (latest) — 2026-09-30
- 0.21.1-next.20260928214050 (next) — 2026-09-28
- 0.21.0-pr-431.20260921210123 (pr-431) — 2026-09-21
- 0.19.0-pr-352.20260829215534 (pr-352) — 2026-08-29
- 0.18.0-pr-306.20260731215718 (pr-306) — 2026-07-31
- 0.17.1-pr-300.20260731010039 (pr-300) — 2026-07-31
- 0.17.0-pr-276.20260721233726 (pr-276) — 2026-07-22
- 0.16.1-pr-265.20260718161156 (pr-265) — 2026-07-18
- 0.15.0-pr-243.20260613121220 (pr-243) — 2026-06-13
- 0.14.0-pr-229.20260613004639 (pr-229) — 2026-06-13
- 0.11.0-pr-172.g462f877 (pr-172) — 2026-05-30
- 0.10.0-pr-171.g56c9fcc (pr-171) — 2026-05-30
- 0.10.0-pr-134.gc6ec955 (pr-134) — 2026-05-30
- 0.8.0-pr-133.g02588d5 (pr-133) — 2026-05-21
- 0.8.0-pr-115.g87a99f9 (pr-115) — 2026-05-16
- … 74 more at https://npm.io/package/@mikrojs/firmware/versions

## README

# @mikrojs/firmware

ESP32 firmware package for Mikro.js. Provides the ESP-IDF integration, build system, and platform-specific modules (GPIO, WiFi, HTTP, etc.) needed to run Mikro.js on ESP32 chips.

## What's included

- **`MikroFirmwareConfig.cmake`** and **`project.cmake`** - the CMake package that integrates with ESP-IDF. Turns the native modules that the project lists into ESP-IDF components, merges SDK config, and applies partition table defaults.
- **`components/mikrojs/`** - ESP-IDF component that compiles the Mikro.js runtime, QuickJS engine, and platform-specific C modules.
- **Default configs** - `sdkconfig.defaults` and `partitions.csv` for common setups.

## Usage

A custom firmware project depends on this package and finds it with `find_package(MikroFirmware REQUIRED COMPONENTS esp32 NO_DEFAULT_PATH)`. `mikro idf` resolves the package from the project through its `cmake` export condition and passes its folder to CMake (see the docs below for the CMakeLists boilerplate):

```
my-firmware/
├── package.json          # depends on @mikrojs/firmware and mikro
├── CMakeLists.txt        # find_package(MikroFirmware ...)
└── main/                 # optional: omit it and the package's default main
    ├── CMakeLists.txt    # (which calls MIK_Main()) is used automatically
    └── main.cpp
```

See the [Custom Firmware](https://mikrojs.dev/develop/custom-firmware) docs for details.

## Requirements

- Node.js >= 24
- ESP-IDF >= 6.1 (installed via [EIM](https://docs.espressif.com/projects/idf-im-ui/en/latest/))

To build, run `pn mikro idf build` in the project. `mikro idf` passes its arguments to `idf.py`, through EIM when ESP-IDF is not active in the shell, and tells CMake where this package is. Plain `idf.py` does not.

---
_Source: https://npm.io/package/@mikrojs/firmware · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
