Registry / devops / xod-arduino

xod-arduino

JSON →
library0.37.0jsnpmunverified

Transpiles XOD projects into Arduino C++ code. Version 0.37.0 is the current stable release. Part of the XOD visual programming ecosystem, this package provides the core compilation pipeline: given a XOD project and an entry patch, it generates Arduino sketch code. Differentiators: tight integration with XOD's node-based paradigm, support for multiple Arduino boards, and optimized code generation for embedded targets. Release cadence is tied to XOD's overall release schedule.

npm install xod-arduino
INSTALL
IMPORT
SIG · XOD-ARDUINO
X
xod-arduino
devopsjavascriptv0.37.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

transpileForArduino
import transpileForArduino from 'xod-arduino'
const transpileForArduino = require('xod-arduino')
Default export, ESM-only. No named export.
transpileForArduino
import transpileForArduino from 'xod-arduino'
import { transpileForArduino } from 'xod-arduino'
This is a default export, not a named export.
transpileSketch
import { transpileSketch } from 'xod-arduino'
const transpileSketch = require('xod-arduino').transpileSketch
Named export for sketch-level transpilation.

Transpile a XOD project to Arduino C++ code using the default entry point.

import transpileForArduino from 'xod-arduino'; import { loadProject } from 'xod-project'; const project = loadProject('/path/to/project.xod'); const code = transpileForArduino(project, '@/main'); console.log(code);
xodc --version
Debug
Known issues
gotchaThe second argument 'entryPointPath' must be a string starting with '@/' indicating a patch path in the project. Incorrect paths cause runtime errors.
fix
Ensure entryPointPath follows the exact patch path syntax, e.g. '@/main'.
affects: >=0.30.0
deprecatedOlder versions (<0.30) accepted a different project format. Projects created with XOD <0.30 must be migrated.
fix
Update to XOD 0.30+ and re-export the project.
affects: <0.30.0
gotchaThe transpiler does not support all Arduino boards equally. Unsupported features may produce incomplete code.
fix
Check the XOD documentation for board compatibility.
affects: >=0.30.0
gotchaThe transpiler expects a flat project structure. Nested patches may not be handled correctly.
fix
Use only flat patch hierarchies or ensure all referenced patches are resolvable.
affects: >=0.30.0
Errors
Common errors & fixes
Error: Cannot find module 'xod-arduino'
Package not installed or not in node_modules.
fix
Run 'npm install xod-arduino xod-project' in your project directory.
TypeError: transpileForArduino is not a function
Incorrect import style; using named import instead of default import.
fix
Use 'import transpileForArduino from 'xod-arduino' instead of '{ transpileForArduino }'.
Error: Invalid entry point path. Must start with '@/'
Entry point path does not follow the required format.
fix
Provide a string like '@/main' where 'main' is a valid patch name.
Upgrade
Version history
0.37.0latest on npm
Audit
Dependencies
xod-projectrequiredProvides project and node types used in transpilation.
xod-func-toolsrequiredUtility functions for functional programming patterns used in the codebase.
Agent activity
9 hits · last 30 days
node
8
Resources
xod-arduino — npm install xod-arduino · libregistry