fn build_log_proto() {
    let mut config = base_config();
    config.out_dir("gen/log");

    config.type_attribute(
        "log.log_entry.v1.LogEntry",
        "#[derive(serde::Serialize, serde::Deserialize)]",
    );

    add_log_proto_derives!(
        config,
        ReplicaConfig,
        "log.replica_config.v1",
        replica_config
    );
    add_log_proto_derives!(
        config,
        ConsensusLogEntry,
        "log.consensus_log_entry.v1",
        consensus,
        height,
        hash
    );

    add_log_proto_derives!(
        config,
        CryptoLogEntry,
        "log.crypto_log_entry.v1",
        crypto,
        trait_name,
        dkg_id,
        request_id,
        public_key,
        registry_version,
        method_name,
        description,
        is_ok,
        error,
        subnet_id,
        dkg_config,
        dkg_dealing,
        dkg_dealer,
        dkg_transcript,
        allowed_tls_clients,
        tls_server,
        dkg_epoch
    );

    add_log_proto_derives!(
        config,
        P2PLogEntry,
        "log.p2p_log_entry.v1",
        p2p,
        event,
        src,
        dest,
        artifact_id,
        chunk_id,
        advert,
        request,
        artifact,
        height,
        disconnect_elapsed
    );

    add_log_proto_derives!(
        config,
        MessagingLogEntry,
        "log.messaging_log_entry.v1",
        messaging,
        round,
        core
    );

    add_log_proto_derives!(
        config,
        IngressMessageLogEntry,
        "log.ingress_message_log_entry.v1",
        ingress_message,
        canister_id,
        compute_allocation,
        desired_id,
        expiry_time,
        memory_allocation,
        message_id,
        method_name,
        mode,
        reason,
        request_type,
        sender,
        size,
        batch_time,
        batch_time_plus_ttl
    );

    add_log_proto_derives!(
        config,
        BlockLogEntry,
        "log.block_log_entry.v1",
        block,
        byte_size,
        certified_height,
        dkg_payload_type,
        hash,
        height,
        parent_hash,
        rank,
        registry_version,
        time
    );

    add_log_proto_derives!(
        config,
        ExecutionLogEntry,
        "log.execution_log_entry.v1",
        execution,
        canister_id
    );

    add_log_proto_derives!(
        config,
        MaliciousBehaviourLogEntry,
        "log.malicious_behaviour_log_entry.v1",
        malicious_behaviour
    );

    compile_protos(config, &["def/log/log_entry/v1/log_entry.proto"]);
}
/// Generates Rust structs from logging Protobuf messages.
Generates Rust structs from logging Protobuf messages.
Generates Rust structs from logging Protobuf messages .
fn build_log_proto() {
    let mut config = base_config();
    config.out_dir("gen/log");
    config.type_attribute(
        "log.log_entry.v1.LogEntry",
        "#[derive(serde::Serialize, serde::Deserialize)]",
    );
    add_log_proto_derives!(
        config,
        ReplicaConfig,
        "log.replica_config.v1",
        replica_config
    );
    add_log_proto_derives!(
        config,
        ConsensusLogEntry,
        "log.consensus_log_entry.v1",
        consensus,
        height,
        hash
    );
    add_log_proto_derives!(
        config,
        CryptoLogEntry,
        "log.crypto_log_entry.v1",
        crypto,
        trait_name,
        dkg_id,
        request_id,
        public_key,
        registry_version,
        method_name,
        description,
        is_ok,
        error,
        subnet_id,
        dkg_config,
        dkg_dealing,
        dkg_dealer,
        dkg_transcript,
        allowed_tls_clients,
        tls_server,
        dkg_epoch
    );
    add_log_proto_derives!(
        config,
        P2PLogEntry,
        "log.p2p_log_entry.v1",
        p2p,
        event,
        src,
        dest,
        artifact_id,
        chunk_id,
        advert,
        request,
        artifact,
        height,
        disconnect_elapsed
    );
    add_log_proto_derives!(
        config,
        MessagingLogEntry,
        "log.messaging_log_entry.v1",
        messaging,
        round,
        core
    );
    add_log_proto_derives!(
        config,
        IngressMessageLogEntry,
        "log.ingress_message_log_entry.v1",
        ingress_message,
        canister_id,
        compute_allocation,
        desired_id,
        expiry_time,
        memory_allocation,
        message_id,
        method_name,
        mode,
        reason,
        request_type,
        sender,
        size,
        batch_time,
        batch_time_plus_ttl
    );
    add_log_proto_derives!(
        config,
        BlockLogEntry,
        "log.block_log_entry.v1",
        block,
        byte_size,
        certified_height,
        dkg_payload_type,
        hash,
        height,
        parent_hash,
        rank,
        registry_version,
        time
    );
    add_log_proto_derives!(
        config,
        ExecutionLogEntry,
        "log.execution_log_entry.v1",
        execution,
        canister_id
    );
    add_log_proto_derives!(
        config,
        MaliciousBehaviourLogEntry,
        "log.malicious_behaviour_log_entry.v1",
        malicious_behaviour
    );
    compile_protos(config, &["def/log/log_entry/v1/log_entry.proto"]);
}
fn build_log_proto ( ) { let mut config = base_config ( ) ; config . out_dir ( " " ) ; config . type_attribute ( " " , " " , ) ; add_log_proto_derives ! ( config ReplicaConfig " " replica_config ) ; add_log_proto_derives ! ( config ConsensusLogEntry " " consensus height hash ) ; add_log_proto_derives ! ( config CryptoLogEntry " " crypto trait_name dkg_id request_id public_key registry_version method_name description is_ok error subnet_id dkg_config dkg_dealing dkg_dealer dkg_transcript allowed_tls_clients tls_server dkg_epoch ) ; add_log_proto_derives ! ( config P2PLogEntry " " p2p event src dest artifact_id chunk_id advert request artifact height disconnect_elapsed ) ; add_log_proto_derives ! ( config MessagingLogEntry " " messaging round core ) ; add_log_proto_derives ! ( config IngressMessageLogEntry " " ingress_message canister_id compute_allocation desired_id expiry_time memory_allocation message_id method_name mode reason request_type sender size batch_time batch_time_plus_ttl ) ; add_log_proto_derives ! ( config BlockLogEntry " " block byte_size certified_height dkg_payload_type hash height parent_hash rank registry_version time ) ; add_log_proto_derives ! ( config ExecutionLogEntry " " execution canister_id ) ; add_log_proto_derives ! ( config MaliciousBehaviourLogEntry " " malicious_behaviour ) ; compile_protos ( config , & [ " " ] ) ; }
Generates Rust structs from logging Protobuf messages.
Generates Rust structs from logging Protobuf messages .