Pages

Friday, 25 October 2024

hhvm


HHVM page | HHVM documentation | Hacklang page | General group | Dev group | Twitter

HHVM is an open-source virtual machine designed for executing programs written in Hack. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining amazing development flexibility.

HHVM should be used together with a webserver like the built in, easy to deploy Proxygen, or a FastCGI-based webserver on top of nginx or Apache.

Installing

If you're new, try our getting started guide.

You can install a prebuilt package or compile from source.

Running

You can run standalone programs just by passing them to hhvm: hhvm example.hack.

If you want to host a website:

  • Install your favorite webserver. Proxygen is built into HHVM, fast and easy to deploy.
  • Install our package
  • Start your webserver
  • Run sudo /etc/init.d/hhvm start
  • Visit your site at http://.../main.hack

Our getting started guide provides a slightly more detailed introduction as well as links to more information.

from https://github.com/facebook/hhvm

--------------------------

It's best to obtain the dependency list from our nightly packaging system, to ensure you're using an up-to-date list; to do this, search https://github.com/hhvm/packaging/ for Build-Depends:

Downloading the HHVM source-code

git clone git://github.com/facebook/hhvm.git
cd hhvm
git submodule update --init --recursive

Building HHVM

This will take a long time.

mkdir build
cd build
cmake -DMYSQL_UNIX_SOCK_ADDR=/var/run/mysqld/mysqld.sock ..
make -j [number_of_processor_cores] # eg. make -j 4
sudo make install

Custom GCC

If you have built your own GCC, you will need to pass additional options to cmake:

-DCMAKE_C_COMPILER=/path/to/gcc -DCMAKE_CXX_COMPILER=/path/to/g++ -DSTATIC_CXX_LIB=On

Running programs

The installed hhvm binary can be found in /usr/local/bin.

Errors

If any errors occur, you may have to remove the CMakeCache.txt file in the checkout.

If your failure was on the make command, try to correct the error and run make again, it should restart from the point it stops. If the error persists, try to remove as explained above.

from https://docs.hhvm.com/hhvm/installation/building-from-source 

https://docs.hhvm.com/hhvm/basic-usage/introductionhh

No comments:

Post a Comment