mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 06:48:03 +00:00
Remove deps on solc
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
mergeInto(LibraryManager.library, {
|
||||
soljson_compile: function(inputPtr, inputLen) {
|
||||
const inputJson = UTF8ToString(inputPtr, inputLen);
|
||||
const output = Module.solc.compile(inputJson)
|
||||
var output = Module.soljson.cwrap('solidity_compile', 'string', ['string'])(inputJson);
|
||||
return stringToNewUTF8(output)
|
||||
},
|
||||
soljson_version: function() {
|
||||
var version = Module.solc.version();
|
||||
var version = Module.soljson.cwrap("solidity_version", "string", [])();
|
||||
return stringToNewUTF8(version)
|
||||
},
|
||||
resolc_compile: function(inputPtr, inputLen) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const babel = require('@rollup/plugin-babel');
|
||||
const copy = require('rollup-plugin-copy');
|
||||
const resolve = require('@rollup/plugin-node-resolve'); // Add this if resolve is not already imported
|
||||
|
||||
const outputDirCJS = 'dist/revive-cjs';
|
||||
const outputDirESM = 'dist/revive-esm';
|
||||
@@ -24,7 +23,6 @@ module.exports = {
|
||||
presets: ['@babel/preset-env'],
|
||||
babelHelpers: 'inline',
|
||||
}),
|
||||
resolve(),
|
||||
copy({
|
||||
targets: [
|
||||
{ src: 'src/resolc.wasm', dest: outputDirCJS },
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
const solc = require('solc');
|
||||
const soljson = require('solc/soljson');
|
||||
const createRevive = require('./dist/revive-cjs/resolc.js');
|
||||
|
||||
const compilerStandardJsonInput = {
|
||||
@@ -31,7 +31,7 @@ const compilerStandardJsonInput = {
|
||||
|
||||
async function runCompiler() {
|
||||
const m = createRevive();
|
||||
m.solc = solc;
|
||||
m.soljson = soljson;
|
||||
|
||||
// Set input data for stdin
|
||||
m.setStdinData(JSON.stringify(compilerStandardJsonInput));
|
||||
|
||||
Reference in New Issue
Block a user