All Projects → abertschi → Graalphp

abertschi / Graalphp

Licence: apache-2.0
An efficient PHP implementation built on GraalVM

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Graalphp

Soltsice
Solidity & TypeScript Integration, Configuration and Examples
Stars: ✭ 94 (-59.66%)
Mutual labels:  truffle
Truffle Next
🛰️ A boilerplate Truffle Box project with Next.js for rapid Ethereum Dapp development
Stars: ✭ 130 (-44.21%)
Mutual labels:  truffle
Armors Solidity
Armors-solidity is a framework to build secure smart contracts on Ethereum.
Stars: ✭ 184 (-21.03%)
Mutual labels:  truffle
Mumbler
My experimental programming language using Truffle
Stars: ✭ 100 (-57.08%)
Mutual labels:  truffle
Truffle
A tool for developing smart contracts. Crafted with the finest cacaos.
Stars: ✭ 11,909 (+5011.16%)
Mutual labels:  truffle
Sablier
The protocol for real-time finance on the Ethereum blockchain
Stars: ✭ 147 (-36.91%)
Mutual labels:  truffle
Rico
The Responsible Initial Coin Offering Framework
Stars: ✭ 83 (-64.38%)
Mutual labels:  truffle
Sparkle Proof Of Loyalty
Sparkle Proof of Loyalty Contract
Stars: ✭ 216 (-7.3%)
Mutual labels:  truffle
Truffle Assertions
🛠 Assertions and utilities for testing Ethereum smart contracts with Truffle unit tests
Stars: ✭ 109 (-53.22%)
Mutual labels:  truffle
Angular Truffle Starter Dapp
Angular CLI + Truffle Starter Dapp; write, compile & deploy smart contracts on Ethereum blockchains
Stars: ✭ 174 (-25.32%)
Mutual labels:  truffle
Starter Kit
An OpenZeppelin starter kit containing React, OpenZeppelin SDK & OpenZeppelin Contracts.
Stars: ✭ 101 (-56.65%)
Mutual labels:  truffle
Contracts
A set of reusable smart-contracts
Stars: ✭ 101 (-56.65%)
Mutual labels:  truffle
Eth Vue
Featured in Awesome Vue [https://github.com/vuejs/awesome-vue], a curated list maintained by vuejs of awesome things related to the Vue.js framework, and Awesome List [https://awesomelists.net/150-Vue.js/3863-Open+Source/18749-DOkwufulueze-eth-vue], this Truffle Box provides everything you need to quickly build Ethereum dApps that have authentication features with vue, including configuration for easy deployment to the Ropsten Network. It's also Gravatar-enabled. Connecting to a running Ganache blockchain network from Truffle is also possible -- for fast development and testing purposes. Built on Truffle 5 and Vue 3, eth-vue uses vuex for state management, vuex-persist for local storage of app state, and vue-router for routing. Authentication functionalities are handled by Smart Contracts running on the Ethereum blockchain.
Stars: ✭ 171 (-26.61%)
Mutual labels:  truffle
React Uport Box
Truffle, Webpack, React, Redux boilerplate with routing and authentication via a UPort.
Stars: ✭ 99 (-57.51%)
Mutual labels:  truffle
Trufflesqueak
A Squeak/Smalltalk VM and Polyglot Programming Environment for the GraalVM.
Stars: ✭ 200 (-14.16%)
Mutual labels:  truffle
Mana
⏣ Solidity Contracts for the Decentraland MANA Token
Stars: ✭ 91 (-60.94%)
Mutual labels:  truffle
Truffle Plugin Verify
✅ Verify your smart contracts on Etherscan from the Truffle CLI
Stars: ✭ 144 (-38.2%)
Mutual labels:  truffle
Truffleruby
A high performance implementation of the Ruby programming language. Built on the GraalVM by Oracle Labs.
Stars: ✭ 2,620 (+1024.46%)
Mutual labels:  truffle
Erc20 Generator
Create an ERC20 Token for FREE in less than a minute with the most used Smart Contract Generator for ERC20 Token. No login. No setup. No coding required.
Stars: ✭ 202 (-13.3%)
Mutual labels:  truffle
React Auth Box
Truffle, Webpack, React, Redux boilerplate with routing and authentication via a smart contract.
Stars: ✭ 172 (-26.18%)
Mutual labels:  truffle

Build Status codebeat badge CodeFactor Codacy Badge

A PHP implementation built on GraalVM

Graalphp is an experimental just-in-time (JIT) compiler and runtime for PHP 7.4+ hosted on GraalVM.

Abstract

PHP is a popular, weakly typed, general purpose programming language. Originally designed for building dynamic web pages, the language has since gained wide adoption in server-side web development. In this work, we describe the design and implementation of graalphp, an experimental compiler and runtime for PHP hosted on Truffle and GraalVM. GraalVM is a virtual machine that supports execution of multiple languages, which are implemented as Abstract Syntax Tree (AST) interpreters based on Truffle. GraalVM uses Graal as its JIT compiler to compile frequently executed code fragments to machine code. We implement a subset of the PHP language to run synthetic benchmarks by The Computer Language Benchmarks Game. We compare peak performance of our implementation against PHP 7 as well as alternative implementations such as HHVM, JPHP and an early alpha version of PHP 8. Experimental results indicate that our runtime reaches competitive results with performance gains of up to 859% compared to PHP 7. These preliminary results suggest that a Truffle-hosted PHP implementation might be significantly faster than existing language implementations.

design

This project was launched as an undergraduate thesis at ETHZ.

Build and Run

For a container image with development and benchmark dependencies see ./docker/.

# Build Dependencies: Linux environment, maven, ant, GraalVM
# download GraalVM from https://github.com/graalvm/graalvm-ce-builds/releases
$ export JAVA_HOME=/path/to/graalvm
$ mvn package
$ ./graalphp <php-file.php>
# build native image:
$ export JAVA_HOME=/path/to/graalvm
$ $JAVA_HOME/bin/gu install native-image
$ export GRAALPHP_BUILD_NATIVE="true"
$ mvn package

Feature Set

High Level Overview of implemented features, current runtime code base. ca. 4000 LOC. Implemented features are chosen to support execution of the Computer Language Benchmark Game. https://github.com/abertschi/graalphp/tree/master/benchmarks/evaluation

Non exhaustive list of features:

  • Datatypes: int, float, boolean, arrays (sequences) of these types
  • Unconditionally defined functions
  • Variables in function scope, global scope
  • Binary, unary, operations
  • while, do while, for, if

More Resources

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].