Skip to content

[DO NOT MERGE] New rust codegen output#1196

Draft
vaavva wants to merge 54 commits intomainfrom
vaavva/wot-compare
Draft

[DO NOT MERGE] New rust codegen output#1196
vaavva wants to merge 54 commits intomainfrom
vaavva/wot-compare

Conversation

@vaavva
Copy link
Member

@vaavva vaavva commented Jan 21, 2026

for reference on what changes are present to the output. Opened this as a PR so we can comment on anything specific
I also included the generated WoT files as reference

@vaavva
Copy link
Member Author

vaavva commented Jan 22, 2026

Note that this PR doesn't compile because of the enum changes

Base automatically changed from vaavva/wot-temp to johndo/codegen2 January 22, 2026 17:15

let receiver_options = receiver_options_builder
.topic_pattern(TELEMETRY_TOPIC_PATTERN)
.topic_pattern("akri/connector/resources/telemetry/{ex:connectorClientId}/{ex:deviceName}/{ex:inboundEndpointName}/assetUpdateEvent")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this no longer a const? Is it because it's unique from the WoT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make it a const within the file if you like. The reason it was a const before is that it was common across Telemetries, so it was defined in a single place (the service module) and imported multiple times. In WoT, each event (telemetry) has its own pattern.

.map(|(k, v)| (format!("ex:{k}"), v))
.collect();

topic_token_map.insert("modelId".to_string(), MODEL_ID.to_string());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are no longer necessary, I take it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"{modelId}" has been removed because WoT Thing Models have no ID. "{telemetryName}" has been removed because each Telemetry has its own MQTT topic pattern, so there is no need for this replaceable token, as there was when there was a single topic pattern for all Telemetries (in DTDL).


use serde::{Deserialize, Serialize};

/// The error code that identifies the error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this is generated from a document, but why does it call this a "code"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you asking why these lines are present in the AdrBaseService DTDL model?

self.0.shutdown().await
}

fn get_err(field_name: &str) -> AIOProtocolError {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this pattern?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loosely analogous to this

RLeclair
RLeclair previously approved these changes Jan 29, 2026
Base automatically changed from johndo/codegen2 to main February 2, 2026 20:30
@jrdouceur jrdouceur dismissed RLeclair’s stale review February 2, 2026 20:30

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants