Weave documentation
Filament

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.

PackageResponsibilityActual public entry points
filament-coreConfiguration, runtime state, errors and metricsConfig, Instance, InstanceMode, Metrics, init_logging
filament-typesShared primitives and constantsDestinationHash, LinkId, InterfaceMode, MTU, ANNOUNCE_CAP
filament-cryptoIdentities, hashing, HMAC, encryption and key derivationIdentity, PublicIdentity, encrypt, decrypt, Fernet, sha256, hkdf module
filament-packetHeader and packet encoding, parsing and structural validationPacket, Header, PacketValidator, Ifac, packet/header/destination enums
filament-transportRouting state, announces, path discovery and forwarding decisionsRoutingTable, AnnounceManager, PathDiscovery, ForwardingEngine
filament-linkLink state, proofs, channels, keepalives and resourcesIdentity, Link, LinkOptions, LinkState, LinkStatus, Channel, Resource
filament-interfacesAsync I/O interfaces and managerInterface, InterfaceManager, TCP/UDP/auto interfaces, feature-gated serial interface
filament-utilitiesOperator executables, local RPC client and display helpersrpc::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:

BinaryImplemented interface and current boundary
filamentdDaemon and length-prefixed JSON RPC over a local socket; several handler results are fixed example values.
filament-statusRequests daemon status/interfaces; output inherits the daemon's data limitations.
filament-pathPath inspection; requesting an actual path remains unfinished.
filament-idIdentity command surface; key generation and hash computation remain unfinished. Use the crypto library for the local signing operation above.
filament-probeProbe command surface; daemon success responses are not proof of remote reachability.
filament-cpTransfer 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.

On this page