Re: Proposing Solang Solidity Compiler
Silas Davis
Hi TSC,
Some may know Sean as a Burrow maintainer and former employee of Monax. Sean now works as an independent developer, but Solang was started as a side-project while Sean was still at Monax getting to observe the idiosyncrasies (and lack of formal grammar) of the Solidity compiler (solc) at first-hand and knew there was a better way with modern compiler tooling. Solang quickly became a Hyperledger Labs project and since then Sean was able to secure funding to work on solang on it to work full time. So while we were all sorry to see him go (and I was sorry to lose my lunch date ðŸ˜) we would be very happy to support this project at Monax - specifically I would like to get involved, and I suspect so would Greg Hill. I know Sean would welcome other interested maintainers on contributors. I think solang has huge potential and to become a viable competitor to solc with the emergence of eWASM. But I think to have the best chance Solang needs help to gain traction _now_.
If you look at the repository statistics you can see the development velocity and effort Sean has put in already. It is also very clear to me that Solang fits the bill as a clearly delineated, cross-project, cross-organisation (with EEA now as an associate member of Hyperledger) project that will be more than a nice-to-have for those wanting to bridge the gap between EVM and WASM, and WASM and blockchains. Sean also spent 11 years at IBM, so he'll fit in around here ;)
In the case of the Burrow project we have merged initial support for this (https://github.com/hyperledger/burrow/pull/1338) and will be working on corollaries to this feature in our roadmap (https://github.com/hyperledger/burrow/issues/1331), see also our update due this week: https://wiki.hyperledger.org/display/TSC/2020+Q1+Hyperledger+Burrow. We can iterate rapidly on the cross-contract calls and possible extensions to the set of externs defined be eWASM.
I would be very happy to act as a sponsor for this proposal.
Silas
On Mon, 17 Feb 2020 at 18:13, Sean Young <sean@...> wrote:
Hello tsc,
I'd like to propose Solang to become a hyperledger project.
Description
-----------
Solang is a compiler for the Solidity language that can target ewasm
(used by Hyperledger Burrow and others), Sawtooth Sabre, and Parity
Substrate. It is written in rust and uses LLVM as the compiler backend. The
aim is for full compatibility with the Solidity language where possible (e.g.
assembly {} with EVM instructions are not supported in wasm context).
Solidity as a language does have its quirks, however it has established
itself as a defacto language commonly for smart contract. Having Solidity
support for the Hyperledger blockchains would be a great feature, conversely
it would be beneficial for those project to colaborate on a common compiler
component.
Other than Burrow, there are many other projects that allow ewasm
smart contracts. When ewasm comes to mainnet ethereum, Solang will be
ready to support it.
Possible future directions:
 - the Solidity language can improve (e.g. string processing or generics)
 - create a solidity language server for IDEs
  (see https://wiki.hyperledger.org/display/INTERN/Create+a+new+Solidity+Language+Server+%28SLS%29+using+Solang+Compiler)
 - Integer arithmetic overflow detection in Solidity
 - introduce foreign function interface, making it possible to link in code
  written in other languages using the llvm linker (e.g. new crypto written
  in C).
 - Fabric can also run wasm chain code:
  https://github.com/hyperledger-labs/fabric-chaincode-wasm
 - There is an experimental evm llvm backend, so Solang could compile to
  EVM just like the Ethereum Solidity compiler.
  https://github.com/etclabscore/evm_llvm
See:
https://solang.readthedocs.io/en/latest/
and
https://github.com/hyperledger-labs/solang
Scope:
-----
The scope is the Solidity language and smart contacts written in wasm;
compiler and related tools like language server (for IDEs) and style hints
(like lint or clippy).
Other than smart contracts, there are also other areas where a wasm compiled
language can help. For example, the BitXHub proposal needs wasm to do cross
chain validation.
Commit development resources
----------------------------
Solang is funded through a web3 foundation grant. The grant funds the project
for full Solidity language support, compatible with the ethereum foundation
solidity compiler. As part of the grant the project has committed to a
roadmap.
Initial Maintainers
-------------------
Sean Young <sean@...>
Neutral
-------
I'm not affiliated with any company or in employment; funding is through a
web3 foundation grant. My interests are compilers and smart contract, not
any ledger in particular.
Thanks,
Sean Young