All Projects → appcypher → Viper

appcypher / Viper

Licence: apache-2.0
[WIP] A Pythonesque language with a design that focuses on efficiency and expressiveness. Compiles to WebAssembly

Programming Languages

python
139335 projects - #7 most used programming language
language
365 projects

Projects that are alternatives of or similar to Viper

Grain
The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾
Stars: ✭ 2,199 (+9460.87%)
Mutual labels:  compiler, webassembly, wasm
Webassemblyjs
Toolchain for WebAssembly
Stars: ✭ 566 (+2360.87%)
Mutual labels:  compiler, webassembly, wasm
Prototype
(deprecated) The journey continues at ASNEXT: https://github.com/AssemblyScript/assemblyscript
Stars: ✭ 2,114 (+9091.3%)
Mutual labels:  compiler, webassembly, wasm
Wasm Forth
A Forth implementation compiling to WebAssembly.
Stars: ✭ 92 (+300%)
Mutual labels:  compiler, webassembly, wasm
Assemblyscript
A TypeScript-like language for WebAssembly.
Stars: ✭ 13,152 (+57082.61%)
Mutual labels:  compiler, webassembly, wasm
Wag
WebAssembly compiler implemented in Go
Stars: ✭ 177 (+669.57%)
Mutual labels:  compiler, webassembly, wasm
Jwebassembly
Java bytecode to WebAssembly compiler
Stars: ✭ 426 (+1752.17%)
Mutual labels:  compiler, webassembly, wasm
Dotnet Webassembly
Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.
Stars: ✭ 535 (+2226.09%)
Mutual labels:  webassembly, wasm
Astro
A fun safe language for rapid prototyping and high performance applications
Stars: ✭ 588 (+2456.52%)
Mutual labels:  webassembly, wasm
Graphql Client
Typed, correct GraphQL requests and responses in Rust
Stars: ✭ 620 (+2595.65%)
Mutual labels:  webassembly, wasm
Wasmer Php
🐘🕸️ WebAssembly runtime for PHP
Stars: ✭ 796 (+3360.87%)
Mutual labels:  webassembly, wasm
Wasmtime
Standalone JIT-style runtime for WebAssembly, using Cranelift
Stars: ✭ 6,413 (+27782.61%)
Mutual labels:  webassembly, wasm
Zwitterion
A web dev server that lets you import anything*
Stars: ✭ 514 (+2134.78%)
Mutual labels:  webassembly, wasm
Pib
PHP in Browser (powered by WebAssembly)
Stars: ✭ 649 (+2721.74%)
Mutual labels:  webassembly, wasm
Gameboy
🎮 Game Boy emulator written in Rust
Stars: ✭ 17 (-26.09%)
Mutual labels:  webassembly, wasm
Wasm Loader
✨ WASM webpack loader
Stars: ✭ 604 (+2526.09%)
Mutual labels:  webassembly, wasm
Vim.wasm
Vim editor ported to WebAssembly
Stars: ✭ 4,915 (+21269.57%)
Mutual labels:  webassembly, wasm
Awesome Wasm
😎 Curated list of awesome things regarding WebAssembly (wasm) ecosystem.
Stars: ✭ 6,377 (+27626.09%)
Mutual labels:  webassembly, wasm
Raylib
A simple and easy-to-use library to enjoy videogames programming
Stars: ✭ 8,169 (+35417.39%)
Mutual labels:  wasm, webassembly
Ssvm
SSVM is a high performance, extensible, and hardware optimized WebAssembly Virtual Machine for cloud, AI, and blockchain applications.
Stars: ✭ 751 (+3165.22%)
Mutual labels:  webassembly, wasm

Moved project into Raccoon

VIPER

INTRODUCTION

Viper is a language with Python 3.x syntax that is amenable to static analysis. The repository both defines the spec of the language and contains a reference implementation of the compiler, which compiles a legal Viper code to WebAssembly.

Viper will not maintain complete syntactic and semantic compatibility with Python. Several dynamic elements known of Python are not available in Viper. For example, Viper doesn't have runtime module modification.

There are other similarly oriented projects, but they are all objectively different from Viper.

MicroPython is a well-optimized Python interpreter (with some JIT support) while Nuitka compiles Python to C. These two projects still allow dynamic aspects of Python, which means their performances may suffer from those parts.

Vyper (not to be mistaken for Viper) primarily targets Ethereum VM and not designed for general-purpose programming.

Also unlike Nim, Boo and Cobra, Viper tries to stick to Python syntax and semantics as much as possible and wherever it makes sense.

RPython is quite similar to this project, but the developers have made it clear that their goal is not to make RPython a standalone language.

SETTING UP THE PROJECT

REQUIREMENTS
STEPS
  • Clone project

    git clone https://www.github.com/appcypher/viper.git
    
  • Move to project's directory

    cd viper
    
  • Install dependencies

    pipenv install
    
  • Build the project [macOS and Linux]

    sh build.sh setup
    
  • Compile and run sample viper code [WIP]

    viper samples/class.vi
    

TESTING

REQUIREMENTS
STEPS
  • You can run all the tests in a single command.
    pipenv run pytest
    

USAGE

  • Show help info

    viper --help
    
  • Compile and execute a Viper source file [WIP]

    viper samples/class.vi
    

LANGUAGE DESIGN

Viper is similar to Python in a lot of ways, but being a statically-typed language, it made some trade-offs to ensure predictable performance. In this respect, Viper is not always compatible with Python.

Viper's type system is also similar to Python's although it is a bit more fleshed out. While Viper prioritizes a design that benefits static analysis, it still allows Python's level of flexibility where statically determinable. This is why type inference and structural typing are an important part of Viper.

For more details, check NOTES.md

LICENSE

Apache License 2.0

Attributions can be found here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].