Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanleecode/solwasmc
Solidity Web Assembly Compiler
https://github.com/ryanleecode/solwasmc
compiler ethereum evm functional-programming nom rust solidity
Last synced: 10 days ago
JSON representation
Solidity Web Assembly Compiler
- Host: GitHub
- URL: https://github.com/ryanleecode/solwasmc
- Owner: ryanleecode
- Created: 2019-08-05T21:58:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-22T12:05:39.000Z (over 5 years ago)
- Last Synced: 2025-01-04T01:35:39.286Z (13 days ago)
- Topics: compiler, ethereum, evm, functional-programming, nom, rust, solidity
- Language: Rust
- Homepage:
- Size: 211 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solwasmc
> Web assembly compiler for the solidity language.
[![Build Status](https://travis-ci.com/drdgvhbh/solc-wasm.svg?branch=master)](https://travis-ci.com/drdgvhbh/solc-wasm)
## Table of contents
- [General info](#general-info)
- [Usage](#usage)
- [Building From Source](#building-from-source)
- [Technologies](#technologies)## General info
The motivation behind Solcwasmc is to build a solidity compiler that can run in the browser via [web assembly](https://webassembly.org/). This is not meant to replace the canonical [solc](https://github.com/ethereum/solidity.git) in terms of usability, but simply act as a drop in replacement for deploying smart contracts in the browser.
## Usage
`npm i @drdgvhbh/solwasmc`
```ts
import { compile } from "@drdgvhbh/solwasmc";const byteCode = compile("contract Test {...}");
```## Building from Source
### Prerequisites
- [Python3](https://www.python.org/downloads/)
- [GNU Make](https://www.gnu.org/software/make/)
- [Cargo](https://github.com/rust-lang/cargo)
- [Rust](https://www.rust-lang.org/)### Build
```sh
make generate
cargo build
```### Build for Web Assembly
```sh
wasm-pack build --scope YOUR_NPM_USERNAME
cd pkg
npm publish --access=public
```## Technologies
- [Nom 5.0.0](https://docs.rs/nom/5.0.0/nom/)
- [Rust](https://www.rust-lang.org/)