Crate veilid_core
source ·Expand description
§The Veilid Framework
Core library used to create a Veilid node and operate it as part of an application.
veilid-core
contains all of the core logic for Veilid and can be used in mobile applications as well as desktop
and in-browser WebAssembly apps.
The public API is accessed by getting a VeilidAPI object via a call to api_startup, api_startup_json, or api_startup_config.
From there, a RoutingContext object can get you access to public and private routed operations.
§Features
The default veilid-core
configurations are:
default
- Usestokio
as the async runtime
If you use --no-default-features
, you can switch to other runtimes:
default-async-std
- Usesasync-std
as the async runtimedefault-wasm
- When building for thewasm32
architecture, use this to enablewasm-bindgen-futures
as the async runtime
Re-exports§
pub use veilid_tools as tools;
Modules§
- The on-the-wire serialization format for Veilid RPC
Macros§
Structs§
- Aligned u64 Required on 32-bit platforms for serialization because Rust aligns u64 on 4 byte boundaries Some zero-copy serialization frameworks also want 8-byte alignment Supports serializing to string for JSON as well, since JSON can’t handle 64-bit numbers to Javascript
- Crypto factory implementation
- V0 CryptoSystem
- DHT Record Descriptor
- DHT Record Report
- Default DHT Schema (DFLT)
- Simple DHT Schema (SMPL)
- Simple DHT Schema (SMPL) Member
- FOURCC code
- Routing contexts are the way you specify the communication preferences for Veilid.
- Options for safety routes (sender privacy)
- A TableDB transaction Atomically commits a group of writes or deletes to the TableDB
- Veilid Table Storage Database for storing key value pairs persistently and securely across runs
- The primary developer entrypoint into
veilid-core
functionality - Direct question blob passed to hosting application for processing to send an eventual AppReply
- Direct statement blob passed to hosting application for processing
- The Veilid Configuration
- Application configuration
- Configure the Distributed Hash Table (DHT)
- Enable and configure HTTP access to the Veilid node
- Enable and configure HTTPS access to the Veilid node
- Configure Network Protocols
- Configure RPC
- Configure the network routing table
- Enable and configure TCP
- Configure TLS
- Enable and configure UDP
- Enable and configure Web Sockets
- Enable and configure Secure Web Sockets
- A VeilidCore log message with optional backtrace
Enums§
- Attachment abstraction for network ‘signal strength’
- DHT Record Report Scope
- Enum over all the supported DHT Schemas
- The choice of safety route to include in compiled routes
- Valid destinations for a message sent over a routing context
- Log level for VeilidCore
Constants§
- Length of a crypto key in bytes
- Length of a crypto key in bytes after encoding to base64url
- Length of a hash digest in bytes
- Length of a hash digest in bytes after encoding to base64url
- Number of cryptosystem signatures to keep on structures if many are present beyond the ones we consider valid
- Envelopes are versioned
- Number of envelope versions to keep on structures if many are present beyond the ones we consider valid
- Out-of-band receipts are versioned along with envelope versions
- Length of a nonce in bytes
- Length of a nonce in bytes after encoding to base64url
- Length of a crypto key in bytes
- Length of a crypto key in bytes after encoding to base64url
- Length of a route id in bytes
- Length of a route id in bytes after encoding to base64url
- Length of a secret key in bytes
- Length of a secret key in bytes after encoding to base64url
- Length of a shared secret in bytes
- Length of a shared secret in bytes after encoding to base64url
- Length of a signature in bytes
- Length of a signature in bytes after encoding to base64url
- Crypto kinds in order of preference, best cryptosystem is the first one, worst is the last one
- Envelope versions in order of preference, best envelope version is the first one, worst is the last one
Statics§
Traits§
- Parse a value from a string
- A trait for converting a value to a
String
.
Functions§
- Initialize a Veilid node.
- Initialize a Veilid node, with the configuration object
- Initialize a Veilid node, with the configuration in JSON format
- Return the best cryptosystem kind we support
- Return the best envelope version we support
- Intersection of crypto kind vectors
- Sort best crypto kinds first Better crypto kinds are ‘less’, ordered toward the front of a list
- Return the default veilid config as a json object
- Return the cargo package version of veilid-core in tuple format
- Return the cargo package version of veilid-core in string format
Type Aliases§
- Number of bytes
- Cryptography version fourcc code
- Handle to a particular cryptosystem
- Version number of envelope format
- Request/Response matching id
- Microseconds since epoch
- Microseconds duration
- Value sequence number
- Value subkey