PHPackages                             leafs/eien - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. leafs/eien

ActiveLibrary[Framework](/categories/framework)

leafs/eien
==========

High-speed, high-performance server for your Leaf apps.

v0.3.0(1y ago)92131[1 issues](https://github.com/leafsphp/eien/issues)MITPHP

Since Oct 8Pushed 1y agoCompare

[ Source](https://github.com/leafsphp/eien)[ Packagist](https://packagist.org/packages/leafs/eien)[ Docs](https://leafphp.dev/modules/eien)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-eien/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

 [![](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)

\[WIP\] Leaf Eien Server
========================

[](#wip-leaf-eien-server)

 [![Latest Stable Version](https://camo.githubusercontent.com/9960b8db2bb19e19e8bb3446c4127ba9d0d646db1edec6347faf4596c81e3ac0/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f6569656e2f762f737461626c65)](https://packagist.org/packages/leafs/eien) [![Total Downloads](https://camo.githubusercontent.com/1dac5427a91301df14c54833892157b5886713e479aadd94c43ed69474314dcc/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f6569656e2f646f776e6c6f616473)](https://packagist.org/packages/leafs/eien) [![License](https://camo.githubusercontent.com/e0849d07fafdfb3b3afb7fdf0454f7bc08c374addc6a0f5cfa657fc122b6a13e/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f6569656e2f6c6963656e7365)](https://packagist.org/packages/leafs/eien)

Eien is Leaf's implementation of a high-speed, high-performance server based on powerful tools like [Open Swoole](https://swoole.co.uk/) and [Swoole](https://github.com/swoole/swoole-src). Eien loads your app in memory and shares a state between requests to achieve amazing speeds.

When serving Leaf apps with Eien, you gain additional performance improvements due to Leaf's lightweight and super fast nature.

> Note that Eien runs on Swoole, so you need to have the swoole extension installed.
>
> - [Swoole Installation docs](https://openswoole.com/docs/get-started/installation)
> - [In case you have errors installing swoole on Mac](https://parsinta.com/articles/setup-php-swoole-in-your-mac-os)

Installation
------------

[](#installation)

You can easily install Eien using the [Leaf CLI](https://cli.leafphp.dev):

```
leaf install eien
```

Or with [Composer](https://getcomposer.org/).

```
composer require leafs/eien
```

Basic Usage
-----------

[](#basic-usage)

Just like with the rest of Leaf, Eien is built to work out of the box without configuring anything or writing any extra code. Once Leaf detects Eien, it will automatically set everything up for you.

To run your app, you will need to open your project root file as a PHP script. You can do this with:

```
php
```

This however would need you to quit and re-run this script everytime you make a change to your Leaf app. To solve this problem, we've added a watch script to Leaf CLI. You can run your Eien based apps like this:

```
leaf serve
```

Contributing
------------

[](#contributing)

We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀.

To report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project.

### Code contributors

[](#code-contributors)

   [ ![](https://avatars.githubusercontent.com/u/26604242?v=4)
  **Michael Darko**  ](https://github.com/mychidarko)  Sponsoring Leaf
---------------

[](#sponsoring-leaf)

Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute.

And to all our existing cash/code contributors, we love you all ❤️

### Cash contributors

[](#cash-contributors)

You can view all sponsors @

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~226 days

Total

4

Last Release

637d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29547806?v=4)[Mychi](/maintainers/Mychi)[@mychi](https://github.com/mychi)

---

Top Contributors

[![mychidarko](https://avatars.githubusercontent.com/u/26604242?v=4)](https://github.com/mychidarko "mychidarko (34 commits)")

---

Tags

phpswoolephpasyncframeworkswooleopenswooleleafleafPHP

### Embed Badge

![Health badge](/badges/leafs-eien/health.svg)

```
[![Health](https://phpackages.com/badges/leafs-eien/health.svg)](https://phpackages.com/packages/leafs-eien)
```

###  Alternatives

[easyswoole/mysqli

An efficient swoole framework

34120.5k27](/packages/easyswoole-mysqli)[easyswoole/fast-cache

An efficient swoole framework

1030.3k2](/packages/easyswoole-fast-cache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
