This repository has been archived by the owner on Jan 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from ewasm/cli
Create a proper CLI
- Loading branch information
Showing
6 changed files
with
29 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env node | ||
|
||
const evm2wasm = require('../index.js') | ||
const ethUtil = require('ethereumjs-util') | ||
|
||
const input = ethUtil.toBuffer(process.argv[2]) | ||
|
||
evm2wasm.evm2wasm(input, { | ||
stackTrace: process.argv[3] === 'trace', | ||
tempName: 'temp', | ||
inlineOps: true, | ||
wabt: true | ||
}).then(function (output) { | ||
console.log(output.toString('binary')) | ||
}).catch(function (err) { | ||
console.err('Failed: ' + err) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ | |
"build": "node ./wasm/generateInterface.js", | ||
"build:docs": "documentation build --github -f md ./index.js > ./docs/index.md" | ||
}, | ||
"bin": { | ||
"evm2wasm": "bin/evm2wasm.js" | ||
}, | ||
"author": "mjbecze <[email protected]>", | ||
"license": "MPL-2.0", | ||
"devDependencies": { | ||
|