Tool to load and run the Solidity compiler. Version 0.3.31 integrates with Remix IDE to compile smart contracts. It provides the Compiler class and CompilerInput helper for building compiler input JSON. Supports loading compiler versions via web worker or script tag, handling imports, and returning compilation results including ABI, bytecode, and source maps. Part of the Remix project, it is maintained with regular releases.
npm install remix-solidityNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate Compiler with a custom import handler, define a Solidity source, listen for compilation events, and compile.
Always provide a proper handleImportCall function that calls cb with content or error.
Upgrade to latest version and follow current API.
Use TypeScript to leverage type definitions or carefully match the expected interface.
Register event listeners before calling compile or loadVersion.
Ensure you use `new Compiler(handleImportCall)` and import as `import { Compiler } from 'remix-solidity'`.Implement handleImportCall to return content for all imported URLs, or ignore imports if not needed.
Install solc separately: `npm install solc` or load it via CDN in browser.
No dependency data recorded yet.