/donet

Read-only mirror of https://gitlab.com/donet-server/donet

Primary LanguageRustGNU Affero General Public License v3.0AGPL-3.0

donet

Donet logo artwork by honeymatsu.

Donet is a free and open source network engine designed after the Distributed Networking protocol, as defined in the high-level networking API of the Panda3D game engine, which was originally developed by Disney Interactive (formerly known as Disney VR Studios) to connect with their in-house server technology, the OTP (Online Theme Park) server, which was used to power their massive multiplayer online games, such as Toontown Online and Pirates of the Caribbean Online, from 2001 to 2013.

Getting Started

The Donet repository is a monorepo that houses two different Rust projects:

  • donet - The Donet daemon source, which includes all the Donet services. See donet-server.org.
  • libdonet - The core utilities for Donet services, including datagram utilities and the DC language parser. See lib.donet-server.org.

Please read the introduction to Donet for an overview of the project and how the engine works.

Before starting your own contribution to Donet, please read over the Contributing Guidelines.

We use Git for version control and Meson as the build system.

The quickest way to build for release is to do the following:

To build Donet, run the following under the project directory:

meson setup build -Dprofile=debug
meson compile -C build

If you are working on a contribution to either the Donet daemon or libdonet, please run code linting and unit testing before pushing:

meson compile linting -C build
meson compile tests -C build

These checks should go over all source files in the donet/ and libdonet/ source directories.

If you would like to build only certain Donet services into the output binary, you can use the available Meson options to trigger feature flags in the Crate:

meson setup build -Dbuild_state_server=true

If any build_* Meson options are passed, --no-default-features is passed to cargo build, which disables building all services. Only the service(s) that you explicitly request to be built will be activated via feature flags.

Code Coverage   codecov

The Donet project uses Codecov as its online dashboard for viewing unit test coverage statistics. The CI/CD pipeline generates the Cobertura XML and uploads it to Codecov if it is on the default branch. You can use the badge above or the badge in the GitLab repository to go to the dashboard for Donet.

Coverage graph

Debugging Unit Tests

To debug unit tests with a debugger such as GDB, you need to have the unit tests binary. You can build this with the following Meson build command:

meson compile build-tests -C build

This Meson run target will build unit tests for each crate in the workspace. The unit test binaries should be written to the following path:

build/target/debug/deps/donetd-<hash>
build/target/debug/deps/libdonet-<hash>

Reviewing Coverage Reports Locally

The latest commit's unit test code coverage report can be viewed online at https://codecov.io. The dashboard displays the code coverage percentage for the entire project and allows you to view covered and missing lines per source file if you are logged in.

During development, you may need to inspect the code coverage report directly from your latest local changes before you can see it on the online dashboard after pushing a new commit.

Donet uses Tarpaulin to generate code coverage reports. To build the coverage report locally, run the following run target using Meson:

meson compile code-coverage -C build

The output of this run target should be 2 coverage report files:

build/target/tarpaulin/cobertura.xml
build/target/tarpaulin/coverage.json

These are large XML/JSON files, so you will need a tool to view the report. You can use pycobertura to view the code coverage report from your terminal. To do this, run:

python -m pip install pycobertura
python -m pycobertura show build/target/tarpaulin/cobertura.xml

Communication

The address of the official Matrix channel for Donet development is #donet:matrix.org.

Documentation

Currently the Donet engine is still under heavy development.

For the libdonet rust library documentation, visit lib.donet-server.org.

Distributed Networking architecture resources

Resources for more info on Panda's Distributed Networking (Sources listed in chronological order):


Copyright and License

Copyright © 2023-2024 Donet Authors

"Donet" can be found at https://gitlab.com/donet-server/donet

"Donet" is distributed under the terms of the GNU Affero General Public License, either version 3.0 or, at your option, any later version WITHOUT ANY WARRANTY. You can read the full copy of the software license in the COPYING file.

Donet logo artwork created by honeymatsu. 🍩

Older revisions of the Donet logo created and designed by Karla Valeria Rodriguez. 🍩

Legal

"we", "us", and "our" refer to the authors of the Donet engine.

“Disney” may refer to The Walt Disney Company, or any of its subsidiaries.

The Donet project and organization is not in any way endorsed by, or affiliated with, the Toontown: Corporate Clash non-profit game studio registered in the United States. We are not affiliated with Disney.