百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

microvium

> 编程语言
开源

一个紧凑,可嵌入的脚本引擎,用于应用程序和用于执行JavaScript语言子集编写的程序的微控制器.

633 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个紧凑,可嵌入的脚本引擎,用于应用程序和用于执行JavaScript语言子集编写的程序的微控制器.

Microvium

Microvium is a tiny JavaScript engine (less than 16kB compiled size) for microcontrollers for running a small but useful subset of the JavaScript language. The runtime engine is portable C code and easy to integrate.

Microvium takes the unique approach partially running the JS code at build time and deploying a snapshot, which leads to a number of advantages over other embedded JavaScript engines. See concepts.md.

Take a look at my blog (coder-mike.com) and Twitter account (@microvium) if you're interested in some of the behind-the-scenes thought processes and design decisions, and to stay updated with new developments.

See also microvium.com where an installer can be downloaded (for Windows only, at this time, and this is a bit out of date -- but contact me if you want the updated version).

Install and Get Started

Check out the Getting Started tutorial which explains the concepts, gives some examples, and shows how to get set up.

Features

See also the set of supported language features.

  • Run high-level scripts on an MCU (bare metal or RTOS).
  • The runtime engine is implemented in pure C and doesn't use any I/O functions such as fopen or printf.
  • Run the same script code on small microcontrollers and desktop-class machines (ideal for IoT applications with shared logic between device and server) -- the runtime engine is available as a C unit and as a node.js library.
  • Run JavaScript on very small devices, requiring less than 16 kB ROM and 64 B of idle RAM depending on the platform and enabled features (for more details, see here).
  • Script code is completely sand-boxed and isolated for security and safety.

There are a few similar alternatives floating around but Microvium takes a unique approach (see Alternatives).

Limitations

A Microvium VM cannot exceed 64 kB of ROM and/or RAM.

There is no standard library and only a subset of JavaScript is currently supported.

Usage

Microvium can be used in 3 ways:

  1. npm install -g microvium globally will install a CLI that runs microvium scripts (and by default produces a snapshot of the final state, in case you want to deploy it)

  2. npm install microvium will install Microvium as an npm library with TypeScript definitions. This is useful if you want to run Microvium on a custom node.js host and control the snapshotting and host API yourself.

  3. Integrate microvium.c into your C or C++ project to resume execution of a snapshot.

See Getting Started which walks you through all 3 of these.

Docs

  • Getting Started
  • Concepts
  • Reference
  • Contribute

Contributing

Check out ./doc/contribute.md.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言