npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

microvium

v8.0.0

Published

A compact, embeddable scripting engine for microcontrollers for executing small scripts written in a subset of JavaScript.

Downloads

32

Readme

Microvium

License

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

Contributing

Check out ./doc/contribute.md.