{"id":20541769,"url":"https://github.com/hivesolutions/viriatum","last_synced_at":"2025-04-14T09:09:27.784Z","repository":{"id":1241445,"uuid":"1179755","full_name":"hivesolutions/viriatum","owner":"hivesolutions","description":"Viriatum Web Server","archived":false,"fork":false,"pushed_at":"2024-08-06T10:55:43.000Z","size":5411,"stargazers_count":10,"open_issues_count":20,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-06T12:43:45.254Z","etag":null,"topics":["fast","http","server","viriatum"],"latest_commit_sha":null,"homepage":"http://viriatum.hive.pt","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hivesolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-12-18T14:14:31.000Z","updated_at":"2024-08-06T10:55:46.000Z","dependencies_parsed_at":"2024-05-10T12:42:48.136Z","dependency_job_id":null,"html_url":"https://github.com/hivesolutions/viriatum","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fviriatum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fviriatum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fviriatum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivesolutions%2Fviriatum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hivesolutions","download_url":"https://codeload.github.com/hivesolutions/viriatum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224865552,"owners_count":17382705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fast","http","server","viriatum"],"created_at":"2024-11-16T01:26:03.166Z","updated_at":"2024-11-16T01:26:03.815Z","avatar_url":"https://github.com/hivesolutions.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [![Viriatum Web Server](res/logo.png)](http://viriatum.hive.pt)\n\nThe Viriatum Web Server is simple and lightweight web server aimed at providing a simple yet powerful solution\nfor static file serving, reverse proxy serving and dynamic language handling.\n\nThe current implementation support both x86/x64 and ARM architectures.\n\n## Building\n\n### Automium\n\nBuilding viriatum using automium is quite simple even for complex builds like cross compilation.\nJust use the appropriate 'build.json' located under 'scripts/build' and under such directory execute:\n\n    atm\n\nFor production purposes one should use the proper optimization flags:\n\n    atm --cflags=-O3\n\nFor cross compilation (eg: arm-rasp-linux) use the following command:\n\n    atm --cflags=-O3 --cross=arm-rasp-linux-gnueabi\n\nIf you want to know more about cross compilation please refer to the [Cross Compilation](doc/cross.md) document.\n\n### Source Control Repository\n\nIf you're going to build viriatum using the git repository you first need to generate the configure\nfiles using autoconf.\n\n    ./autogen.sh\n\n### Unix\n\nFor building under unix simple instructions are used:\n\n    ./configure\n    make \u0026\u0026 make install\n\nIn order to provide a correct (system wide) configuration path use:\n\n    ./configure --sysconfdir=/etc\n\nIn order to get the most performance out of viriatum set the CFLAGS variable for optimization:\n\n    CFLAGS=\"-O3\" ./configure\n\n### Unix 32bit from 64bit\n\n    apt-get libc6-dev-i386\n    export CC=\"cc -m32\"\n    ./configure\n    make \u0026\u0026 make install\n\n### Android\n\nBuilding viriatum for android involves cross compilation and the android ndk toolkit must be used.\n\nCheck the instructions for downloading the android ndk from the [official website](http://developer.android.com/sdk/ndk/),\nthen unpack the android-ndk package file into the current directory.\n\nThe recommended NDK version is `r8e` as compatibility is ensured for that version. NDK is currently\nknown to have problems compiling some of the packages (including PHP, Python and Lua). To download that\nversion of the NDK for Linux use this [link](http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2).\n\nBecause of problems building the static versions of PHP, Python, Lua, etc. some of the modules are\ncurrently not compatible with Android.\n\nThe `r8d` or preivous versions of the NDK are meant to be run only under x86 machines and should\nbe used with care unnder x86-64 based machines.\n\n    tar -xvf android-ndk-r[x]-linux-[arch].tar.bz2\n\nCreate the standalone toolchain using the script for that purpose.\n\n    android-ndk-r[x]/build/tools/make-standalone-toolchain.sh --system=linux-x86_64\\\n        --platform=android-4 --install-dir=/opt/android-toolchain\n\nAnd then you may use the \"just\" created toolchain to build Viriatum with:\n\n    export PATH=/opt/android-toolchain/bin:$PATH\n    export CFLAGS=\"-L/opt/android-toolchain/lib -I/opt/android-toolchain/include\\\n        -L/opt/android-root/lib -I/opt/android-root/include\"\n    ./configure --host=arm-linux-androideabi --build=arm --prefix=/opt/android-root\n    make \u0026\u0026 make install\n\n### Windows\n\nFor building using the default mingw32 toolchain.\n\n    apt-get install mingw32 mingw32-binutils\n    ./configure --host=i586-mingw32msvc --build=i686-linux --prefix=/opt/i586-mingw32\n    make \u0026\u0026 make install\n\nFor building using the mingw-w64 toolchain for 64 and 32 bit options.\n\n    apt-get install mingw-w64 gcc-mingw-w64 binutils-mingw-w64\n    ./configure --host=x86_64-w64-mingw32 --build=i686-linux --prefix=/opt/x86_64-w64-mingw32\n    ./configure --host=i686-w64-mingw32 --build=i686-linux --prefix=/opt/i686-w64-mingw32\n    make \u0026\u0026 make install\n\n#### Notes\n\n* In order to compile to `WINVER \u003c= 0x0500` (Windows 2000 or older) disable IPv6 support (`#undef VIRIATUM_IP6`)\n\n### FreeBSD\n\nFreeBSD ignores the /usr/local directory by default so it must be included in order to conform with dependencies.\n\n    setenv CFLAGS \"-L/usr/local/lib -I/usr/local/include\"\n\n## Features\n\nThere are a lot of possible building features to enable\n\n* `--with-moduleroot=path` - Sets the path to be used to load the modules\n* `--with-wwwroot=path` - Sets the path to be used to install and serve the default content\n* `--enable-debug` - Enables the extra debugging capabilities in Viriatum\n* `--enable-defaults` - Enables the default paths in the viriatum server, ignoring wwwroot and moduleroot at runtime\n* `--disable-ipv6` - Disables the support for the IPv6 protocol stack\n* `--disable-epoll` - Disables the support for the epoll mechanism\n* `--enable-mpool`- Enables the memory pool support (optimized for windows only)\n* `--enable-prefork` - Enables the prefork support so that viriatum can create workers\n\n## Modules\n\nThere are a series of modules for the viriatum server that are used to extend functionaly\nof the base server, in order to compile then some rules apply.\nCurrent modules include:\n\n* `mod_lua` - For interaction with the Lua interpreter\n* `mod_php` - For interaction with the PHP interpreter (complex compilation)\n* `mod_wsgi` - For interaction with the Python interpreter using the [WSGI](http://wsgi.org) specification.\n\n### Lua Module\n\nFor an Ubuntu Linux environment the Lua 5.1 development packages must be included using:\n\n    apt-get install liblua5.1-0-dev\n\n### PHP Module\n\nMust compile the PHP interpreter with support for embeding, this should create the library with the propr SAPI\nsymbols loaded.\n\n    ./configure --enable-embed\n\nFor static linking of the PHP library, useful for package distribution the following command may be used so\nthat no external library dependencies are created. Note that the `-fPIc` flag must be set to allow the creation\nof static library for position independent code.\n\n    export CFLAGS=\"-fpic\"\n    ./configure --enable-embed=static --disable-libxml --disable-dom --disable-simplexml\\\n        --disable-xml --disable-xmlreader --disable-xmlwriter --without-pear --without-iconv\n\nIn order to configure the PHP interpreter to locate the php.ini file in the correct location use:\n\n    --with-config-file-path=/usr/lib\n\nAdditional libraries may be linked and a typical compilation of the PHP distribution would include the following\nflags required by most of the applications.\n\n    --enable-bcmath --with-mysql --with-mysqli --with-gmp --with-openssl\n\nAdditional information about the compilation flags may be found [here](http://php.net/manual/en/configure.about.php).\n\nThe PHP module must then be compiled with `CFLAGS` environment variable set to point to the proper include directories\nso that the module code is able to compiled against these header files.\n\n    export CFLAGS=\"-I/usr/local/include/php -I/usr/local/include/php/main\\\n        -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend\"\n\n### WSGI Module\n\nFor an ubuntu linux environment the python development packages must be included using:\n\n    apt-get install python2.7-dev\n\nMust compile viriatum with special environment variables set to point to the correct headers directory.\n\n    export CFLAGS=\"-I/usr/include/python2.7\"\n    export CFLAGS=\"-I/System/Library/Frameworks/Python.framework/Headers\"\n\n## Docker\n\nIt's possible to run viriatum inside a docker container and pre-built images\nhave been created under the public repository.\n\nTo use viriatum using these pre-built images use the following command:\n\n    docker run -d joamag/devel /usr/sbin/viriatum\n\n## Benchmarking\n\n* Most of the information presented in [gwan benchmark](http://gwan.ch/en_apachebench_httperf.html) is applicable for benchmarking Viriatum\n\nFor more information regarding benchmarking please check the list of [todo](doc/todo.md) information.\n\n## Debugging\n\n* For windows debugging use [Visual Leak Detector](http://vld.codeplex.com) using the `#include \u003cvld.h\u003e` statement\n* In linux/unix environments use [Valgrind](http://valgrind.org) with `valgrind --tool=memcheck --leak-check=full viriatum`\n\n## Profiling\n\n* On windows systems the tool to uses is the [Very Sleepy](http://www.codersnotes.com/sleepy)\n* For linux/unix machines the best approach is to go with either [Sysprof](http://sysprof.com/) or the more expensive\n[Zoom](http://www.rotateright.com) from rotate right\n\n## Versioning\n\nThe current version numbering in viriatum follows the following wildcard based structure\n`${MAJ}.${MIN}.${MIC}${STA}${STA_VER}` and in order to change any of these values the\n`definitions.h`  and the `build.json` files must be changed.\n\nIn case any one of the version numbers or the stage value changes a new tag must be created in the\ngit repository, so that the version is correctly identified for the repository contributors.\n\n## License\n\nViriatum is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).\n\n## Build Automation\n\n[![Build Status](https://app.travis-ci.com/hivesolutions/viriatum.svg?branch=master)](https://travis-ci.com/github/hivesolutions/viriatum)\n[![Build Status GitHub](https://github.com/hivesolutions/viriatum/workflows/Main%20Workflow/badge.svg)](https://github.com/hivesolutions/viriatum/actions)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhivesolutions%2Fviriatum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhivesolutions%2Fviriatum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhivesolutions%2Fviriatum/lists"}