Kompact
=======
[](https://github.com/kompics/kompact)
[](https://crates.io/crates/kompact)
[](https://docs.rs/kompact)
[](https://codecov.io/gh/kompics/kompact)

Kompact is an in-development message-passing component system like [Kompics](https://kompics.github.io/docs/current/) in the Rust language, with performance and static typing in mind. It merges both Kompics' component model and the actor model as found in [Erlang](http://www.erlang.se/) or [Akka](https://akka.io/).
Kompact has [shown](https://kompics.github.io/kompicsbenches/) itself to vastly outperform many of its peers on a wide range of message-passing tasks, providing the capability of handling up to 400mio messages per second on 36 cores.
Kompact comes with its own network library built-in, providing easy connection maintenance and efficient serialisation for distributed deployments.
## Documentation
For reference and short examples check the [API Docs](https://docs.rs/kompact).
A thorough introduction with many longer examples can be found in the [tutorial](https://kompics.github.io/kompact/). The examples themselves can be found in the [docs/examples](docs/examples) folder.
#### Rust Version
Kompact before `v0.9.0` requires Rust `nightly`.
Since `v0.9.0` Kompact can be built on stable Rust, with a slightly different API.
## Build And Test
Use the split test plan when testing the full repository:
```bash
cargo test --workspace --exclude kompact-net --exclude kompact-examples-local --exclude kompact-examples-net
cargo test -p kompact-examples-local
cargo test -p kompact-net
cargo test -p kompact-examples-net
```
This keeps the local-only examples and other local actor tests in a non-distributed build. Cargo unifies features across all selected workspace members, and `kompact-net` and the network examples enable Kompact's distributed support. When local-only actors are selected in the same Cargo command as those crates, they are compiled against the distributed `Actor` trait, where `receive_network` is part of the required API.
The repository also provides a helper script for this:
```bash
./run_tests.sh
```
Run the Clippy checks with the same feature-compatible split used by CI:
```bash
./run_checks.sh
```
## License
Licensed under the terms of MIT license.
See [LICENSE](LICENSE) for details.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Kompact by you shall be licensed as MIT, without any additional terms or conditions.