
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
This is a JavaScript library that implementats the AVR 8-bit architecture.
It's the heart- but not the whole body- of the Arduino simulator at https://wokwi.com.
AVR8jsThis library only implements the AVR CPU core. You have to supply it pre-compiled machine code to run, and implement functional simulations of any external hardware. You will probably also want to add audio/visual representations of external hardware being simulated.
A rough conceptual diagram:
Pre-Compiled machine code --> AVR8js <--> Glue code <--> external hardware functional simulation <--> simulation state display for the user
You may be interested in exploring the wokwi-elements collection of web-components for visual representations of many common hardware components. (Note: these are visual only elements- you will need to add the appropriate functional simulation and glue code.)
A step-by-step video tutorial showing how to build a simple Arduino simulator using AVR8js and React:
And a related blog post.
These examples show working examples of using avr8js in an application. Many of them also demonstrate how to use the wokwi-elements and include working examples of functional simulations of the components, and how to hook them up to avr8js.
Note: they are all hosted outside of this repo.
The demo project allows you to edit Arduino code, compile it, and run it in the simulator. It also simulates 2 LEDs connected to pins 12 and 13 (PB4 and PB5).
To run the demo project, check out this repository, run npm install and then npm start.
The library focuses on simulating the ATmega328p, which is the MCU used by the Arduino Uno.
However, the code is built in a modular way, and is highly configurable, making it possible to simulate many chips from the AVR8 family, such as the ATmega2560 and the ATtiny series:
Check out issue 67 and issue 73 for more information.
Run the tests once:
npm test
Run the tests of the files you modified since last commit (watch mode):
npm run test:watch
For more information, please check the Contributing Guide.
Copyright (C) 2019-2025 Uri Shaked. The code is released under the terms of the MIT license.
FAQs
Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
We found that avr8js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.