Crate map
The eight actual Filament crates, their distinct exports and the six declared utility binaries.
The workspace manifest declares eight packages. Use the individual Cargo package name, replacing hyphens with underscores in Rust imports.
| Package | Responsibility | Actual public entry points |
|---|---|---|
| filament-core | Configuration, runtime state, errors and metrics | Config, Instance, InstanceMode, Metrics, init_logging |
| filament-types | Shared primitives and constants | DestinationHash, LinkId, InterfaceMode, MTU, ANNOUNCE_CAP |
| filament-crypto | Identities, hashing, HMAC, encryption and key derivation | Identity, PublicIdentity, encrypt, decrypt, Fernet, sha256, hkdf module |
| filament-packet | Header and packet encoding, parsing and structural validation | Packet, Header, PacketValidator, Ifac, packet/header/destination enums |
| filament-transport | Routing state, announces, path discovery and forwarding decisions | RoutingTable, AnnounceManager, PathDiscovery, ForwardingEngine |
| filament-link | Link state, proofs, channels, keepalives and resources | Identity, Link, LinkOptions, LinkState, LinkStatus, Channel, Resource |
| filament-interfaces | Async I/O interfaces and manager | Interface, InterfaceManager, TCP/UDP/auto interfaces, feature-gated serial interface |
| filament-utilities | Operator executables, local RPC client and display helpers | rpc::RpcClient, daemon, common, display, default path helpers |
The package references contain manifest feature flags and exact source declarations. Some manifests use registry or Git dependencies even inside this workspace. An application's path dependency does not automatically redirect all transitive dependencies to neighboring source directories.
Distinguish similarly named types
filament_crypto::Identity and filament_link::Identity are separate structs. The crypto constructor returns a Result; the link constructor returns Self. There are no root filament_crypto::KeyPair, sign or verify exports: signing and verification are identity methods.
Likewise, filament_types::DestinationHash, filament_transport::DestinationHash and the link crate's [u8; 16] destination alias are different Rust types. Use the exact type expected by your chosen layer. Shared types do not export Bytes32 or Hash.
InstanceMode contains Shared and Isolated. LinkState is a state struct; its status enum is LinkStatus.
Local identity operation
This example exercises only the crypto identity API. It makes no network connection and does not export private keys. Signatures and return types were checked against filament-crypto/src/identity.rs; this documentation pass did not execute or compile the example.
use filament_crypto::Identity;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let identity = Identity::generate()?;
let message = b"Filament local signature";
let signature = identity.sign(message);
assert!(identity.verify(message, &signature));
assert_eq!(identity.hash().len(), 16);
Ok(())
}Command-line utilities
filament-utilities/Cargo.toml declares six binaries:
| Binary | Implemented interface and current boundary |
|---|---|
filamentd | Daemon and length-prefixed JSON RPC over a local socket; several handler results are fixed example values. |
filament-status | Requests daemon status/interfaces; output inherits the daemon's data limitations. |
filament-path | Path inspection; requesting an actual path remains unfinished. |
filament-id | Identity command surface; key generation and hash computation remain unfinished. Use the crypto library for the local signing operation above. |
filament-probe | Probe command surface; daemon success responses are not proof of remote reachability. |
filament-cp | Transfer command surface; daemon transfer responses are not proof of copied bytes. |
The manifest reference lists each binary's source path. Review current implementation boundaries before building an operator workflow around these commands.