Solidity compiler wrapper and artifactor that provides smart recompilation, project-wide compilation, per-file Solidity version management, and configurable artifact output. Current stable version: 7.0.1. Release cadence: irregular, part of 0x monorepo. Key differentiators: intelligent caching (only recompiles changed contracts), automatic version resolution from pragma statements, and standard input description support for flexible artifacts. Ships TypeScript types. Requires Node >=6.12. Suitable for both CLI and programmatic use.
npm install solidity-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic programmatic usage: instantiate Compiler with paths and options, then call compile().
Remove useDockerisedSolc and specify solcVersion/solcVersions.
Explicitly provide artifactsDir in options.
Use exact version or define solcVersions array.
Add "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"] to tsconfig.json.
Switch to named import { Compiler } from '@0x/sol-compiler'.Add "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"] to tsconfig.json, or install @0x/typescript-typings.
Either install the version via npm (npm install solc@0.8.0) or add it to the solcVersions array.
Use import { Compiler } from '@0x/sol-compiler' or const { Compiler } = require('@0x/sol-compiler').