Skip to main content

Rust SDK support

Rust SNMP SDK 1.0 FAQ

Frequently asked questions

Build Rust SNMP management applications with confidence

These answers summarize Rust SNMP SDK 1.0. For complete setup instructions, API behavior, examples, security guidance, and troubleshooting, see the Rust SNMP SDK Developer Guide. Applicable license terms and written commercial terms from iReasoning control product use and distribution.

Product, platform, and integration

About Rust SNMP SDK 1.0

What is iReasoning Rust SNMP SDK?

It is a Rust-first SDK for building SNMP manager applications. It provides typed blocking and asynchronous client APIs, notification reception, and owned SMIv1 and SMIv2 MIB models. The package combines a safe Rust facade with target-specific compiled native libraries.

How does the Rust SDK differ from the Java SNMP API?

Both products support SNMP management applications and MIB processing, but they use separate language-native interfaces and packaging. The Java API is the established pure-Java library. The Rust SDK presents owned Rust data types through a safe facade over a versioned native ABI, with no Java, JDK, JVM, or JNI dependency.

Can the Rust SNMP SDK be used to build an SNMP agent?

No. The SDK is for manager-side applications that send requests and receive notifications. Use MIBGen Rust SNMP Agent Builder when you need to create an SNMP agent.

Which SNMP versions and security features are supported?

The SDK supports SNMPv1, SNMPv2c, and SNMPv3. SNMPv3 includes USM authentication, privacy, authoritative-engine discovery, and timeliness handling. Supported algorithms include MD5, SHA-1, SHA-2, DES, 3DES, and AES-128/192/256, subject to the credentials and protocol configuration selected by the application.

Which Rust versions and operating-system targets are supported?

The SDK requires Rust 1.85 or newer. Target archives are available for x86-64 and Arm64 Linux, Intel and Apple silicon macOS, and x86-64 Windows with the MSVC toolchain. Use the archive that matches the final application target.

Does the Rust SDK require a JDK, JNI, or external protocol libraries?

No. It does not require a JDK, JVM, JNI runtime, native cryptography package, or external ASN.1 library. Tokio is a dependency of the safe crate for its asynchronous facade, but a blocking-only application does not need to create a Tokio runtime.

Can I link the SDK statically or dynamically?

Yes. Static linking is the default, and dynamic libraries are also included. Enable exactly one linkage mode. A dynamically linked deployment must make the matching shared library available to the operating-system loader.

How do I obtain and license the Rust SDK?

Rust SDK access is currently sales-assisted. Contact iReasoning with your target platforms and intended application so we can provide the appropriate package and commercial terms. The applicable license and signed written terms govern use, redistribution, maintenance, and fees.

Requests and traversal

Using the manager APIs

Which manager operations are available?

The safe API supports GET, GET-NEXT, SET, GET-BULK, walk, and subtree operations. Responses use typed Rust models for messages, PDUs, variable bindings, OIDs, and values. GET-BULK is not valid for SNMPv1, so the SDK reports a configuration error if that combination is requested.

Are both blocking and asynchronous APIs available?

Yes. Blocking clients work directly in synchronous applications. Async clients use bounded blocking jobs and can be used inside an existing Tokio application without creating a nested runtime. Clones of the same async client share and serialize access to the same underlying session.

What happens when an asynchronous request is cancelled?

Cancellation is cooperative. Dropping the future stops waiting for its result, but the active native request may continue until its configured network timeout. Choose bounded timeouts that are appropriate for your application's shutdown and recovery requirements.

When should I use streaming walk or subtree traversal?

Use streaming traversal when a result may be large or when the application should process batches as they arrive instead of accumulating the complete result in memory. Async streaming callbacks must be Send + 'static and run on a bounded blocking worker.

How are errors and binary compatibility reported?

Operations return typed Result<T> values with structured SDK errors. The safe facade validates the native ABI major version and JSON schema before using native handles. A mismatched library is reported as IncompatibleAbi rather than being used silently.

Notifications, MIBs, and deployment

Operating and troubleshooting the SDK

Can the SDK receive traps and INFORM requests?

Yes. The notification receiver accepts SNMPv1 traps and SNMPv2c or SNMPv3 traps and INFORM requests over UDP. A valid INFORM is acknowledged before the receive call returns. Blocking and asynchronous receiver interfaces are available.

Does the notification receiver persist SNMPv3 engine state?

No. The SDK maintains receiver state while the receiver is running, but the application is responsible for persisting and restoring authoritative-engine state when its deployment requires continuity across restarts.

What can the included MIB parser do?

It parses SMIv1 and SMIv2 modules into owned, serializable Rust models. The registry resolves imports and qualified symbolic names, builds OID trees, formats values using MIB metadata, and looks up trap and notification definitions.

Why does a symbolic OID fail to resolve?

Load the defining MIB and all required imported modules before resolving the name. Use a qualified name when the same symbol could appear in more than one module. Numeric OIDs can still be parsed directly when no MIB registry is needed.

What should I check if linking or application startup fails?

Confirm that the SDK archive matches the Rust target, that static and dynamic features are not enabled together, and that the build can locate the native library. For dynamic linking, also verify the operating-system loader path. If startup reports IncompatibleAbi, replace the native library and Rust crates with versions from the same SDK archive.

What should I check when requests time out or SNMPv3 authentication fails?

Verify the destination address, port, transport, SNMP version, community or USM credentials, timeout, retries, firewall, and agent access policy. For SNMPv3, also confirm the authentication and privacy protocols, passwords or localized keys, security level, engine discovery, and clock or timeliness behavior.

Where can I find examples and detailed documentation?

The Rust SNMP SDK 1.0 Developer Guide includes installation instructions, blocking and async examples, the complete safe API reference, notification and MIB workflows, deployment guidance, and a troubleshooting checklist. Generated Rust API documentation is also included in each SDK archive.