[package]
edition = "2021"
name = "net-mesh"
version = "0.35.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance, schema-agnostic, backend-agnostic event bus"
readme = "README.md"
keywords = [
"event-bus",
"high-performance",
"streaming",
]
categories = [
"asynchronous",
"concurrency",
"data-structures",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/ai-2070/net"
[features]
batched-ingress = ["net"]
cli = [
"dataforts",
"redex-disk",
"dep:clap",
]
cortex = ["redex"]
dataforts = [
"redex",
"redex-disk",
"dep:blake3",
"dep:fastcdc",
"dep:reed-solomon-erasure",
"dep:unicode-normalization",
]
default = [
"net",
"nat-traversal",
"cortex",
"meshdb",
"meshos",
"dataforts",
]
ffi = []
fixtures = []
jetstream = ["dep:async-nats"]
meshdb = ["cortex"]
meshos = [
"cortex",
"dep:blake3",
]
nat-traversal = ["net"]
net = [
"dep:chacha20poly1305",
"dep:ring",
"dep:snow",
"dep:getrandom",
"dep:dashmap",
"dep:crossbeam-queue",
"dep:socket2",
"dep:hex",
"dep:libc",
"dep:blake2",
"dep:blake3",
"dep:ed25519-dalek",
"dep:x25519-dalek",
"dep:subtle",
"dep:postcard",
]
netdb = ["cortex"]
port-mapping = [
"nat-traversal",
"dep:igd-next",
]
redex = [
"net",
"dep:tokio-stream",
"dep:postcard",
]
redex-disk = ["redex"]
redis = ["dep:redis"]
regex = ["dep:regex"]
tool = ["cortex"]
[lib]
name = "net"
crate-type = [
"lib",
"staticlib",
]
path = "src/lib.rs"
[[bin]]
name = "net-blob"
path = "src/bin/net-blob.rs"
required-features = ["cli"]
[[example]]
name = "docs_quickstart"
path = "examples/docs_quickstart.rs"
[[example]]
name = "interop_smoke"
path = "examples/interop_smoke.rs"
[[example]]
name = "mesh_demo"
path = "examples/mesh_demo.rs"
[[example]]
name = "natsim_node"
path = "examples/natsim_node.rs"
[[test]]
name = "aggregator_fold_query"
path = "tests/aggregator_fold_query.rs"
[[test]]
name = "aggregator_registry_rpc"
path = "tests/aggregator_registry_rpc.rs"
[[test]]
name = "batched_ingress_integrity"
path = "tests/batched_ingress_integrity.rs"
[[test]]
name = "blob_transfer"
path = "tests/blob_transfer.rs"
[[test]]
name = "bus_shutdown_drain"
path = "tests/bus_shutdown_drain.rs"
[[test]]
name = "bus_stranded_flush"
path = "tests/bus_stranded_flush.rs"
[[test]]
name = "capability_aggregation_e2e"
path = "tests/capability_aggregation_e2e.rs"
[[test]]
name = "capability_auth_call_path"
path = "tests/capability_auth_call_path.rs"
[[test]]
name = "capability_auth_conformance"
path = "tests/capability_auth_conformance.rs"
[[test]]
name = "capability_broadcast"
path = "tests/capability_broadcast.rs"
[[test]]
name = "capability_exposure_revocation"
path = "tests/capability_exposure_revocation.rs"
[[test]]
name = "capability_multihop"
path = "tests/capability_multihop.rs"
[[test]]
name = "capability_schema_doc_guard"
path = "tests/capability_schema_doc_guard.rs"
[[test]]
name = "capability_scope"
path = "tests/capability_scope.rs"
[[test]]
name = "chain_discovery"
path = "tests/chain_discovery.rs"
[[test]]
name = "channel_auth"
path = "tests/channel_auth.rs"
[[test]]
name = "channel_auth_hardening"
path = "tests/channel_auth_hardening.rs"
[[test]]
name = "channel_auth_origin_binding"
path = "tests/channel_auth_origin_binding.rs"
[[test]]
name = "connect_direct"
path = "tests/connect_direct.rs"
[[test]]
name = "connect_post_start"
path = "tests/connect_post_start.rs"
[[test]]
name = "coordinator_selection"
path = "tests/coordinator_selection.rs"
[[test]]
name = "cortex_ryw_global_cap"
path = "tests/cortex_ryw_global_cap.rs"
[[test]]
name = "cross_lang_capability_fixtures"
path = "tests/cross_lang_capability_fixtures.rs"
[[test]]
name = "dataforts_blob_e2e"
path = "tests/dataforts_blob_e2e.rs"
[[test]]
name = "dataforts_blob_v3_cdc_conformance"
path = "tests/dataforts_blob_v3_cdc_conformance.rs"
[[test]]
name = "dataforts_blob_v3_composed_conformance"
path = "tests/dataforts_blob_v3_composed_conformance.rs"
[[test]]
name = "dataforts_blob_v3_rs_conformance"
path = "tests/dataforts_blob_v3_rs_conformance.rs"
[[test]]
name = "dataforts_blob_v3_tree_conformance"
path = "tests/dataforts_blob_v3_tree_conformance.rs"
[[test]]
name = "dataforts_gravity_e2e"
path = "tests/dataforts_gravity_e2e.rs"
[[test]]
name = "dataforts_greedy_e2e"
path = "tests/dataforts_greedy_e2e.rs"
[[test]]
name = "deck_pipeline"
path = "tests/deck_pipeline.rs"
[[test]]
name = "dir_transfer"
path = "tests/dir_transfer.rs"
[[test]]
name = "direct_upgrade"
path = "tests/direct_upgrade.rs"
[[test]]
name = "doc_link_guard"
path = "tests/doc_link_guard.rs"
[[test]]
name = "error_kind_mirror"
path = "tests/error_kind_mirror.rs"
[[test]]
name = "event_pingwave"
path = "tests/event_pingwave.rs"
[[test]]
name = "failure_detector_matrix"
path = "tests/failure_detector_matrix.rs"
[[test]]
name = "ffi_poll_buffer"
path = "tests/ffi_poll_buffer.rs"
[[test]]
name = "ffi_shutdown_race"
path = "tests/ffi_shutdown_race.rs"
[[test]]
name = "gang_alloc_witness"
path = "tests/gang_alloc_witness.rs"
[[test]]
name = "gang_claim_node"
path = "tests/gang_claim_node.rs"
[[test]]
name = "integration_cortex_adapter"
path = "tests/integration_cortex_adapter.rs"
required-features = ["cortex"]
[[test]]
name = "integration_cortex_memories"
path = "tests/integration_cortex_memories.rs"
required-features = ["cortex"]
[[test]]
name = "integration_cortex_tasks"
path = "tests/integration_cortex_tasks.rs"
required-features = ["cortex"]
[[test]]
name = "integration_jetstream"
path = "tests/integration_jetstream.rs"
required-features = ["jetstream"]
[[test]]
name = "integration_mesh_cancel"
path = "tests/integration_mesh_cancel.rs"
[[test]]
name = "integration_net"
path = "tests/integration_net.rs"
required-features = ["net"]
[[test]]
name = "integration_netdb"
path = "tests/integration_netdb.rs"
required-features = ["netdb"]
[[test]]
name = "integration_nrpc_client_streaming"
path = "tests/integration_nrpc_client_streaming.rs"
[[test]]
name = "integration_nrpc_cross_lang"
path = "tests/integration_nrpc_cross_lang.rs"
required-features = ["cortex"]
[[test]]
name = "integration_nrpc_cross_lang_streaming"
path = "tests/integration_nrpc_cross_lang_streaming.rs"
[[test]]
name = "integration_nrpc_duplex"
path = "tests/integration_nrpc_duplex.rs"
[[test]]
name = "integration_nrpc_loopback"
path = "tests/integration_nrpc_loopback.rs"
[[test]]
name = "integration_nrpc_mesh"
path = "tests/integration_nrpc_mesh.rs"
[[test]]
name = "integration_nrpc_predicate_header"
path = "tests/integration_nrpc_predicate_header.rs"
required-features = ["cortex"]
[[test]]
name = "integration_nrpc_protected"
path = "tests/integration_nrpc_protected.rs"
[[test]]
name = "integration_nrpc_service_discovery"
path = "tests/integration_nrpc_service_discovery.rs"
[[test]]
name = "integration_nrpc_streaming"
path = "tests/integration_nrpc_streaming.rs"
[[test]]
name = "integration_placement_filter_callback"
path = "tests/integration_placement_filter_callback.rs"
required-features = ["net"]
[[test]]
name = "integration_redex"
path = "tests/integration_redex.rs"
required-features = ["redex"]
[[test]]
name = "integration_redis"
path = "tests/integration_redis.rs"
required-features = ["redis"]
[[test]]
name = "integration_tool_announce"
path = "tests/integration_tool_announce.rs"
[[test]]
name = "loom_models"
path = "tests/loom_models.rs"
[[test]]
name = "meshdb_subprotocol_wire"
path = "tests/meshdb_subprotocol_wire.rs"
[[test]]
name = "meshos_pipeline"
path = "tests/meshos_pipeline.rs"
[[test]]
name = "migration_integration"
path = "tests/migration_integration.rs"
[[test]]
name = "migration_target_failure_mid_chunking"
path = "tests/migration_target_failure_mid_chunking.rs"
[[test]]
name = "nat_classify"
path = "tests/nat_classify.rs"
[[test]]
name = "nat_matrix"
path = "tests/nat_matrix.rs"
[[test]]
name = "natsim"
path = "tests/natsim.rs"
[[test]]
name = "net_blob_cli"
path = "tests/net_blob_cli.rs"
required-features = ["cli"]
[[test]]
name = "netdb_builder_and_accessors"
path = "tests/netdb_builder_and_accessors.rs"
[[test]]
name = "netsocket_production_defaults"
path = "tests/netsocket_production_defaults.rs"
[[test]]
name = "nrpc_call_hijack"
path = "tests/nrpc_call_hijack.rs"
[[test]]
name = "nrpc_inbound_dispatcher"
path = "tests/nrpc_inbound_dispatcher.rs"
[[test]]
name = "nrpc_registration_order"
path = "tests/nrpc_registration_order.rs"
[[test]]
name = "nrpc_response_routing"
path = "tests/nrpc_response_routing.rs"
[[test]]
name = "nrpc_route_discriminator"
path = "tests/nrpc_route_discriminator.rs"
[[test]]
name = "nrpc_service_equality"
path = "tests/nrpc_service_equality.rs"
[[test]]
name = "nrpc_streaming_gate"
path = "tests/nrpc_streaming_gate.rs"
[[test]]
name = "org_admission_gate"
path = "tests/org_admission_gate.rs"
[[test]]
name = "org_admission_wire"
path = "tests/org_admission_wire.rs"
[[test]]
name = "org_ownership"
path = "tests/org_ownership.rs"
[[test]]
name = "parallel_bind_stress"
path = "tests/parallel_bind_stress.rs"
[[test]]
name = "parsed_packet_short_input"
path = "tests/parsed_packet_short_input.rs"
[[test]]
name = "peer_death_clears_capability_index"
path = "tests/peer_death_clears_capability_index.rs"
[[test]]
name = "peer_death_evicts_peer_map"
path = "tests/peer_death_evicts_peer_map.rs"
[[test]]
name = "port_mapping_null"
path = "tests/port_mapping_null.rs"
[[test]]
name = "port_mapping_real_router"
path = "tests/port_mapping_real_router.rs"
[[test]]
name = "proxy_coverage_gaps"
path = "tests/proxy_coverage_gaps.rs"
[[test]]
name = "punch_keepalive"
path = "tests/punch_keepalive.rs"
[[test]]
name = "punch_keepalive_timing"
path = "tests/punch_keepalive_timing.rs"
[[test]]
name = "queue_group_dispatch"
path = "tests/queue_group_dispatch.rs"
[[test]]
name = "recv_drain_depth"
path = "tests/recv_drain_depth.rs"
[[test]]
name = "redex_replication_dst"
path = "tests/redex_replication_dst.rs"
[[test]]
name = "redex_replication_e2e"
path = "tests/redex_replication_e2e.rs"
[[test]]
name = "reflex_override"
path = "tests/reflex_override.rs"
[[test]]
name = "reflex_probe"
path = "tests/reflex_probe.rs"
[[test]]
name = "rendezvous_ack"
path = "tests/rendezvous_ack.rs"
[[test]]
name = "rendezvous_coordinator"
path = "tests/rendezvous_coordinator.rs"
[[test]]
name = "rendezvous_introduce_validation"
path = "tests/rendezvous_introduce_validation.rs"
[[test]]
name = "route_withdraw"
path = "tests/route_withdraw.rs"
[[test]]
name = "routed_transport_availability"
path = "tests/routed_transport_availability.rs"
[[test]]
name = "scheduled_stream"
path = "tests/scheduled_stream.rs"
[[test]]
name = "scheduled_stream_integrity"
path = "tests/scheduled_stream_integrity.rs"
[[test]]
name = "scheduler_bridge_driver"
path = "tests/scheduler_bridge_driver.rs"
[[test]]
name = "send_drain_depth"
path = "tests/send_drain_depth.rs"
[[test]]
name = "send_subprotocol_malformed"
path = "tests/send_subprotocol_malformed.rs"
[[test]]
name = "sensing_dispatch"
path = "tests/sensing_dispatch.rs"
[[test]]
name = "sensing_e2e_registration"
path = "tests/sensing_e2e_registration.rs"
[[test]]
name = "sensing_failure_plane"
path = "tests/sensing_failure_plane.rs"
[[test]]
name = "sensing_fallback"
path = "tests/sensing_fallback.rs"
[[test]]
name = "sensing_leader_delivery"
path = "tests/sensing_leader_delivery.rs"
[[test]]
name = "sensing_lease"
path = "tests/sensing_lease.rs"
[[test]]
name = "sensing_lease_wire"
path = "tests/sensing_lease_wire.rs"
[[test]]
name = "sensing_org_three_node"
path = "tests/sensing_org_three_node.rs"
[[test]]
name = "sensing_origin_emitter"
path = "tests/sensing_origin_emitter.rs"
[[test]]
name = "sensing_relay_delivery"
path = "tests/sensing_relay_delivery.rs"
[[test]]
name = "sensing_rendezvous"
path = "tests/sensing_rendezvous.rs"
[[test]]
name = "sensing_resolver"
path = "tests/sensing_resolver.rs"
[[test]]
name = "sensing_routed_origin"
path = "tests/sensing_routed_origin.rs"
[[test]]
name = "sensing_scheduler_bridge"
path = "tests/sensing_scheduler_bridge.rs"
[[test]]
name = "serve_rpc_reannounce_baseline"
path = "tests/serve_rpc_reannounce_baseline.rs"
[[test]]
name = "stream_ack_ranges"
path = "tests/stream_ack_ranges.rs"
[[test]]
name = "stream_config_and_error_display"
path = "tests/stream_config_and_error_display.rs"
[[test]]
name = "subnet_assign_alloc"
path = "tests/subnet_assign_alloc.rs"
required-features = ["net"]
[[test]]
name = "subnet_auth_e2e"
path = "tests/subnet_auth_e2e.rs"
required-features = [
"net",
"cortex",
"fixtures",
]
[[test]]
name = "subnet_axis_demotion"
path = "tests/subnet_axis_demotion.rs"
[[test]]
name = "subnet_control_facts"
path = "tests/subnet_control_facts.rs"
required-features = ["net"]
[[test]]
name = "subnet_enforcement"
path = "tests/subnet_enforcement.rs"
[[test]]
name = "subnet_gateway_auth"
path = "tests/subnet_gateway_auth.rs"
[[test]]
name = "subnet_gateway_local_auth"
path = "tests/subnet_gateway_local_auth.rs"
required-features = ["net"]
[[test]]
name = "subnet_grant"
path = "tests/subnet_grant.rs"
[[test]]
name = "subnet_grant_hierarchy"
path = "tests/subnet_grant_hierarchy.rs"
[[test]]
name = "subnet_org_boundary"
path = "tests/subnet_org_boundary.rs"
[[test]]
name = "subnet_relay_alloc_e2e"
path = "tests/subnet_relay_alloc_e2e.rs"
required-features = [
"net",
"fixtures",
]
[[test]]
name = "subnet_revocation"
path = "tests/subnet_revocation.rs"
[[test]]
name = "subnet_route_hop_alloc"
path = "tests/subnet_route_hop_alloc.rs"
[[test]]
name = "subnet_session_auth"
path = "tests/subnet_session_auth.rs"
[[test]]
name = "three_node_integration"
path = "tests/three_node_integration.rs"
[[test]]
name = "transfer_concurrency"
path = "tests/transfer_concurrency.rs"
[[test]]
name = "transfer_fairness"
path = "tests/transfer_fairness.rs"
[[test]]
name = "transport_error_codes"
path = "tests/transport_error_codes.rs"
[[test]]
name = "traversal_observability"
path = "tests/traversal_observability.rs"
[[bench]]
name = "auth_guard"
path = "benches/auth_guard.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "capability_burst"
path = "benches/capability_burst.rs"
harness = false
required-features = [
"net",
"tool",
]
[[bench]]
name = "capability_propagation"
path = "benches/capability_propagation.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "capability_scheduler_reaction"
path = "benches/capability_scheduler_reaction.rs"
harness = false
required-features = [
"net",
"redex",
]
[[bench]]
name = "cortex"
path = "benches/cortex.rs"
harness = false
required-features = [
"cortex",
"netdb",
]
[[bench]]
name = "ingestion"
path = "benches/ingestion.rs"
harness = false
[[bench]]
name = "island_claim_boundaries"
path = "benches/island_claim_boundaries.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "island_claim_divergence"
path = "benches/island_claim_divergence.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "island_claim_fallback"
path = "benches/island_claim_fallback.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "island_claim_harness"
path = "benches/island_claim_harness.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "island_claim_match"
path = "benches/island_claim_match.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "island_claim_recovery"
path = "benches/island_claim_recovery.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "island_claim_sensed"
path = "benches/island_claim_sensed.rs"
harness = false
required-features = [
"net",
"redex",
]
[[bench]]
name = "mesh"
path = "benches/mesh.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "net"
path = "benches/net.rs"
harness = false
required-features = [
"net",
"fixtures",
]
[[bench]]
name = "org_signature"
path = "benches/org_signature.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "origin_cache_bench"
path = "benches/origin_cache_bench.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "parallel"
path = "benches/parallel.rs"
harness = false
[[bench]]
name = "placement"
path = "benches/placement.rs"
harness = false
required-features = [
"net",
"fixtures",
]
[[bench]]
name = "redex"
path = "benches/redex.rs"
harness = false
required-features = ["redex"]
[[bench]]
name = "reliability"
path = "benches/reliability.rs"
harness = false
required-features = ["net"]
[[bench]]
name = "sensing_signature"
path = "benches/sensing_signature.rs"
harness = false
required-features = ["net"]
[dependencies.arc-swap]
version = "1.7.1"
[dependencies.async-nats]
version = "0.50"
optional = true
[dependencies.async-trait]
version = "0.1"
[dependencies.base64]
version = "0.23"
[dependencies.blake2]
version = "0.10"
optional = true
[dependencies.blake3]
version = "1"
optional = true
[dependencies.bytes]
version = "1"
[dependencies.chacha20poly1305]
version = "0.11"
features = ["zeroize"]
optional = true
[dependencies.clap]
version = "4"
features = [
"derive",
"env",
]
optional = true
[dependencies.crossbeam-queue]
version = "0.3"
optional = true
[dependencies.crossbeam-utils]
version = "0.8"
[dependencies.dashmap]
version = "6"
optional = true
[dependencies.ed25519-dalek]
version = "3"
features = [
"rand_core",
"zeroize",
]
optional = true
[dependencies.fastcdc]
version = "~4.0"
optional = true
default-features = false
[dependencies.futures]
version = "0.3"
[dependencies.getrandom]
version = "0.4.2"
optional = true
[dependencies.hex]
version = "0.4"
optional = true
[dependencies.igd-next]
version = "0.17"
features = ["aio_tokio"]
optional = true
default-features = false
[dependencies.libc]
version = "0.2"
optional = true
[dependencies.lru]
version = "0.18"
[dependencies.parking_lot]
version = "0.12"
[dependencies.postcard]
version = "1"
features = ["alloc"]
optional = true
default-features = false
[dependencies.quanta]
version = "0.12"
[dependencies.redis]
version = "1.2"
features = [
"tokio-comp",
"connection-manager",
]
optional = true
[dependencies.reed-solomon-erasure]
version = "6"
features = ["std"]
optional = true
default-features = false
[dependencies.regex]
version = "1"
optional = true
[dependencies.ring]
version = "0.17"
optional = true
[dependencies.semver]
version = "1"
[dependencies.serde]
version = "1"
features = [
"derive",
"rc",
]
[dependencies.serde_json]
version = "1"
features = ["raw_value"]
[dependencies.snow]
version = "0.10.0"
optional = true
[dependencies.socket2]
version = "0.6"
features = ["all"]
optional = true
[dependencies.subtle]
version = "2"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"sync",
"time",
"macros",
"net",
"io-util",
]
[dependencies.tokio-stream]
version = "0.1"
features = ["sync"]
optional = true
[dependencies.tracing]
version = "0.1"
[dependencies.unicode-normalization]
version = "0.1"
optional = true
[dependencies.x25519-dalek]
version = "3"
features = [
"static_secrets",
"zeroize",
]
optional = true
[dependencies.xxhash-rust]
version = "0.8"
features = ["xxh3"]
[dev-dependencies.blake3]
version = "1"
[dev-dependencies.criterion]
version = "0.8"
features = ["async_tokio"]
[dev-dependencies.hdrhistogram]
version = "7"
[dev-dependencies.postcard]
version = "1"
features = ["use-std"]
[dev-dependencies.rand]
version = "0.10"
[dev-dependencies.tokio]
version = "1"
features = [
"full",
"test-util",
]
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
"env-filter",
"fmt",
]
[target."cfg(loom)".dev-dependencies.loom]
version = "0.7"
[lints.clippy]
expect_used = "warn"
multiple_unsafe_ops_per_block = "warn"
undocumented_unsafe_blocks = "warn"
unwrap_used = "warn"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(loom)"]
[profile.bench]
lto = true
codegen-units = 1
panic = "unwind"
[profile.dev]
opt-level = 0
debug = 2
[profile.native]
lto = "thin"
inherits = "release"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
[profile.release-with-debug]
debug = 2
inherits = "release"