Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic structs #48

Merged
merged 5 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
General JSON and binary support for custom structs
This is a really powerful feature that allows you to use the type
definition to encode and decode structs into a vec of variants. This
should with a little more work make it possible to create a client that
can read from any server without needing codegen for the types on that
server.
  • Loading branch information
einarmo committed Dec 4, 2024
commit a270521f18fa8cbacb630723bc04ba6aa4cffbeb
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ client = ["opcua-client"]
# Console logging just installs a logger that writes out to the screen, useful for general logging
console-logging = ["env_logger"]
# The json feature adds serialize/deserialize to all OPC-UA types.
json = ["opcua-types/json"]
json = ["opcua-types/json", "opcua-client/json"]
# Includes all the code to populate the address space with the default node set. This is something that embedded
# systems may or may not require.
generated-address-space = ["opcua-server/generated-address-space", "opcua-core-namespace"]
# Allows a server to register itself with a local discovery server. It does so by becoming a client to the LDS,
# which brings in a dependency to opcua-client. Omitting the feature saves some memory.
discovery-server-registration = ["opcua-server/discovery-server-registration"]
# Methods for XML parsing and loading of nodesets from XML.
xml = ["opcua-types/xml", "opcua-nodes/xml"]
xml = ["opcua-types/xml", "opcua-nodes/xml", "opcua-client/xml"]


[dependencies]
Expand Down
7 changes: 6 additions & 1 deletion opcua-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ readme = "../README.md"
documentation = "https://docs.rs/opcua/"
edition = "2021"

[features]
json = ["opcua-types/json"]
xml = ["opcua-xml", "opcua-types/xml"]

[lib]
name = "opcua_client"

Expand All @@ -31,4 +35,5 @@ serde = { workspace = true }

opcua-types = { path = "../opcua-types" }
opcua-core = { path = "../opcua-core" }
opcua-crypto = { path = "../opcua-crypto" }
opcua-crypto = { path = "../opcua-crypto" }
opcua-xml = { path = "../opcua-xml", optional = true }
Loading