AI Agent Hub
Back to plugins
🤖

dsh-json-to-rust

Model Inference Updated 2026.08.19

Run the following command in DeepSeek Harness:

dsh plugin install uckkk/dsh-json-to-rust

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install uckkk/dsh-json-to-rust in DeepSeek Harness to install this plugin; source code is available at https://github.com/uckkk/dsh-json-to-rust .

About this plugin

Rust developers who interface with external APIs or debug payloads often find themselves hand-translating a JSON sample into serde structs. Deeply nested objects, optional fields, and rename attributes make that chore both tedious and error-prone. dsh-json-to-rust removes the step entirely: feed it a JSON document and get back a ready-to-compile Rust serde struct definition.

The plugin exposes a single tool, json_to_rust, implemented in pure Node.js with no local Rust toolchain required. Generated code follows standard serde conventions, including snake_case field names, Option wrappers for nullable values, and sensible type inference, so the output drops straight into your project as a type scaffold.

It is well suited for Rust backend and systems engineers who frequently work with JSON contracts, especially during prototyping or integration testing when you need a quick type skeleton from a sample payload. Released under the MIT license, the source is short and auditable, making it safe to adopt in everyday workflows.

Use Cases

  • Rapidly scaffold serde types from JSON examples in API documentation
  • Map configuration JSON to strongly-typed structs during prototyping to avoid runtime parse errors
  • Convert captured packet payloads directly into Rust structs for integration debugging

Best For

  • Rust backend engineers working with frequent JSON contracts
  • Systems programmers who need quick type skeletons from sample data
  • Rust beginners learning serde through real JSON examples