Crates.io | va |
lib.rs | va |
version | 0.0.1 |
source | src |
created_at | 2021-05-25 22:15:35.991283 |
updated_at | 2021-05-25 22:17:45.864469 |
description | Va is an emerging smart contract language for the Vapory blockchain. |
homepage | https://github.com/vapory-testing/va |
repository | https://github.com/vapory-testing/va.git |
max_upload_size | |
id | 402062 |
size | 9,593 |
Va is an emerging smart contract language for the Vapory blockchain.
Va is inspired by Vyper and aims to achieve the goals of the existing Vyper project along with the following additional goals: * Emphasis on correct implementation via use of better tooling, application of formal methods, and stricter development practices * A complete language specification to aid in verification of compiler correctness * Support for both eWASM and EVM code generation via use of the YUL IR format * Implementation in a powerful, systems-oriented language (Rust) with strong safety guarantees * Syntactic improvements and additional code re-use features * Statically built compiler binaries for smoother installation process * WASM compiler binaries for enhanced portability and in-browser compilation of Va contracts
Va aims to achieve most of the goals of the existing Vyper project. Those goals are described in that project's documentation though we include a summary of them here: * Bounds and overflow checking * Decidability by limitation of dynamic program behavior * More precise gas estimation (as a consequence of decidability) * Static typing * Pure function support * Binary fixed-point math * Restrictions on reentrancy * Static looping The following is a list of goals or aspects of the existing Vyper project that we do not necessarily wish to duplicate: * Lack of code re-use features such as:
We wish to promote the following development practices: * Thorough unit testing of all compiler components, from lexing and parsing routines to type checking and compilation routines. * Thorough integration testing of combined components to identify issues with abstraction boundaries. * Property-based testing or fuzz testing of components where appropriate. For examples of property-based testing frameworks, see QuickCheck for Rust, QuickCheck for Haskell, and hypothesis.
We wish to leverage the YUL IR format as a means of targeting both the eWASM and EVM platforms. YUL is actively developed by the Solidity community and we see a great opportunity for synergy with the Solidity project through shared use of YUL.
The Rust programming language has been a rising star in the PL community for a number of years. We believe it provides a reasonable balance between the following factors: * Type and memory safety * Ease of use * Expressivity * Size and quality of developer community * Availability of modern language idioms such as iterators, functional programming features, etc. * Support from established organizations such as Mozilla The Rust project and Mozilla foundation are also some of the primary drivers behind the WASM project, which will likely end up playing a central role in the Ethereum community. The Rust compiler is one of the premier compilers to target the WASM platform. The use of a compiled language in general, and Rust in particular, will facilitate improvements in the compiler release process. New compiler versions could be offered as statically compiled binaries (removing dependence on existing Python binaries) or as WASM binaries (opening up the possibility to run Fe in-browser or, in the distant future, on-chain).
We wish to provide a complete language specification with the following parts: * Syntax specification in extended BNF format similar to the Python grammar specification.
Development of Va is currently in its early stages. Here's a rough overview of recently completed work as well as some short and long-term goals. None of these lists should be considered exhaustive and should also not be considered to represent the exact prioritization of work items.
tokenize
module to Rust * [x] Settled on overall
design of parser * [x] Completed a few basic parsers * [x] All code is now tested on both native and WASM platforms with WASM
testing via node.js * [x] Achieve ~100% code coverage by tests. Coverage is currently maximized at ~99% due to some code paths being unreachable and our coverage tool currently having no
support for ignoring specific lines of code.async
constructs, lambda
expressions, argument packing syntax like *args
and **kwargs
, etc.) - Include grammatical elements that more directly capture Fe language
constructs (such as event, contract, or interface definitions, type dimensions, etc.)