Registry / devops / embark-compiler

embark-compiler

JSON →
library6.0.0jsnpmunverified

Embark compiler module that abstracts the compiler interface and exposes a plugin API for contract extensions. Current stable version is 6.0.0, part of the Embark framework (release cadence: major versions every 6-12 months, nightly releases). Key differentiators: integrates with Solidity (solc), supports plugin-based compiler registration, and provides a command-driven compilation flow. Compared to alternatives like Truffle Compile, it is tightly coupled with the Embark ecosystem and uses a unique event-based request pattern.

devops
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.

File class is part of embark-core, not embark-compiler. ESM import required.

import { File } from 'embark-core'

This is an event request, not a direct import. Used via the Embark events system.

embark.events.request('compiler:contracts:compile', contractFiles, options, callback)

registerCompiler is a plugin API method on the plugins object, not a named export.

plugins.registerCompiler('extension', callback)

Compiles a Solidity contract using Embark's event-based request system, showing the minimal setup with a File object.

import { File } from 'embark-core'; const contractFiles = [new File({ path: 'SimpleStorage.sol', type: 'custom', resolver: (cb) => cb('pragma solidity ^0.5.0; contract SimpleStorage { uint storedData; }') })]; embark.events.request('compiler:contracts:compile', contractFiles, { isCoverage: false }, (err, compiledObject) => { if (err) { console.error(err); return; } console.log('Bytecode:', compiledObject.runtimeBytecode); });
Debug
Known footguns
breakingembark-compiler v6.0.0 drops support for Node <10.17.0 and npm <6.11.3.
deprecatedThe old callback-based plugin API (registerCompiler) may be removed in future versions.
gotchaFile objects must include a 'type' property; omitting it may cause errors.
gotchaCompilation options parameter is required and must include isCoverage (boolean).
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
ahrefsbot
4
gptbot
3
claudebot
3
Resources