Expand description
§donet-core
Provides the necessary utilities and definitions for using the Donet networking protocol.
These utilities include a lexer, parser, and high-level representation of the parsed DC file, as well as creating datagrams, iterating through datagrams, and the definition of every message type in the Donet protocol.
§Getting Started
The recommended way to get started is to enable all features.
Do this by enabling the full
feature flag:
donet-core = { version = "0.1.0", features = ["full"] }
§Feature Flags
The crate provides a set of feature flags to reduce the amount of compiled code. It is possible to just enable certain features over others. Below is a list of the available feature flags.
full
: Enables all feature flags available for donet-core.datagram
: Includes Datagram / Datagram Iterator source for writing network packets.dcfile
: Includes the DC file lexer, parser, and DC element structures.
You can return to the Donet manual at docs.donet-server.org
.
Re-exports§
pub use protocol::*;
Modules§
- This module provides
datagram::Datagram
anditerator::DatagramIterator
. - Data model of the DC Array element, which is a parameter type that stores a list of values of the same data type.
- Data model for a DC Atomic Field, which represents a remote procedure call method of a Distributed Class.
- Base data model for DC Field elements. Alone, it represents an attribute of a structure or Distributed Class.
- Root structure that stores the collection of DC elements in memory. Provides functions for manipulating the tree.
- Representation of arbitrary and historical keywords as defined in the DC file.
- Data model for Distributed Class definitions in the DC file. Stores DC Fields and tracks class hierarchy.
- Data model for a DC Molecular field, which represents a form of a field ‘alias’ for a collection of fields.
- Structure representing data types supported in the DC language and enforcing numeric limits through constraints.
- Global configuration variables for the DC parser pipeline.
- Data model that represents a single parameter of an atomic field, which together form a RPC method signature.
- Data model representing a DC Struct element. [NEEDS WORK]
- Data model that represents a DC switch statement.
- Represents all data types supported by the DC language and developer-defined type alias definitions.
- Includes definitions of type aliases for Donet concepts, and the full definition of the network protocol message types.
- hashgen 🔒Prime Number Generator and 32-bit DC File Hash generator based off Panda3D.
- parser 🔒Module of libdonet that contains the
Context Free Grammar
definition of the DC file language, the process of generating the DC fileAbstract Syntax Tree
, and the process of converting the AST into the final DC file class hierarchy structure that is used by the Donet daemon at runtime to be able to interpret network messages that follow the network contract defined in the DC file(s). - This module defines the
Protocol
enum, which stores every type of message in the Donet protocol, along with their 16-bit ID.
Functions§
- Creates a
pretty_env_logger
logger if nolog
logger is found to be initialized in this process. - Returns false if a
log
logger is not initialized. - Front end to the donet-core DC parser pipeline.
- Easy to use interface for the DC file parser. Handles reading the DC files, instantiating the DC parsing pipeline, and either returns the DCFile object or a Parse/File error.