R3E Community has printed a brand new model of NeoRust, a considerable upkeep launch targeted on code high quality, safety, and developer expertise.
First launched in 2021, NeoRust is a Rust SDK that helps builders construct on high of Neo N3 utilizing a high-level API with built-in error dealing with. The challenge was funded by GrantShares in 2023 and contains instruments for cryptography, pockets administration (BIP-39/44 HD pockets, multisig, and {hardware} pockets assist), and RPC-based node interplay. It additionally helps good contract deployment and invocation, NEP-17 token manipulation, WebSocket-based occasion monitoring, transaction simulation for value estimation, and community configuration for MainNet, TestNet, and customized networks.
Principal enhancements in v1.0.3
NeoRust v1.0.3, launched on February seventh, went via 10 rounds of code overview and refactoring efforts that addressed error dealing with patterns, reminiscence safety, efficiency optimizations, and platform-specific options. This launch is suitable with Neo-CLI v3.9.1, guaranteeing builders make the most of the most recent Neo blockchain options, together with contract price whitelisting, Treasury native contracts, and enhanced execution price issue accuracy launched within the January 2026 Neo v3.9 replace.
Improved error dealing with
Descriptive error messages: This launch replaces over 40 messages. .unwrap() name with .count on() Comprises descriptive error messages to enhance the developer expertise when debugging points. Slightly than encountering a generic panic message, builders now obtain contextual details about what went mistaken and the place.
Code cleanup: Lifeless code elimination removes unused fields, imports, and commented code all through the codebase, decreasing the upkeep burden and enhancing code readability for contributors and customers inspecting the SDK sources.
Efficiency optimization
Reminiscence allocation effectivity: 9 vector allocations are optimized. Vec::with_capacity() Preallocation reduces pointless reminiscence reallocation throughout runtime operations. This launch additionally removes 4 pointless .clone() This eliminates redundant reminiscence copies that may impression efficiency in high-throughput eventualities.
Boundary Test: Added debug_assert! Buffer bounds statements in hotpath decoder strategies present extra security ensures throughout growth and testing with out impacting launch construct efficiency.
Documentation enhancements
Full module protection: This launch provides complete documentation to beforehand undocumented modules, reaching 100% module documentation protection. serde_with_utils and contract_manifest modules. All Serde serialization helpers now embrace utilization examples.
Reminiscence format documentation: StackItem enum describes varied dimension and boxing issues to assist builders perceive reminiscence utilization patterns when working with stack gadgets within the Neo digital machine.
Zero-copy entry technique: new as_array_ref() and as_map_entries() technique of StackItem Supplies environment friendly zero-copy entry to array and map knowledge with out pointless allocations.
Model Consistency: Fastened doc model mismatch and up to date references from v1.0.1 to v1.0.3. lib.rs and neo_types/mod.rs Positioned in 4 places, preserving historic references the place crucial.
Improved safety
NeoRust v1.0.3 introduces a number of safety enhancements targeted on defending delicate cryptographic materials in reminiscence.
Zeroing reminiscence: Zeroize and ZeroizeOnDrop Trait carried out KeyPair Securely clears the personal key bytes from reminiscence when the important thing pair is deleted. customized Drop implementation Account and NEP6Account Ensures that encrypted personal key strings are zeroized to forestall delicate knowledge from remaining in reminiscence after use.
Enter Validation: Comprises enter validation assertions added to forestall buffer underflows in debug builds and detect potential safety points throughout growth earlier than they attain manufacturing.
Dependency safety: jsonwebtoken Upgraded from model 9.2.0 to 10.3.0 utilizing rust_crypto Performance eliminates course of degree CryptoProvider Meet your necessities and modernize your encryption implementation.
Platform-specific fixes
This launch additionally addresses platform-specific points affecting credential storage on macOS and Home windows.
macOS Keychain integration: neo-cli macOS Keychain integration has been fastened by changing lacking standalone operate calls (passwords::set_generic_password, get_generic_password, delete_generic_password) with the right one SecKeychain From the strategy API security-framework 2.11. This permits Neo Pockets credentials to be correctly saved and retrieved utilizing the native macOS Keychain.
Home windows Credential Retailer: A borrow compiler error (E0382) after a transfer was resolved by reordering operations on Home windows credential storage. store_windows_credentialprefix the borrow. HashMap::insert Transfer operation. This repair permits Home windows customers to correctly retailer their pockets credentials within the native Home windows Credential Supervisor.
Improved code high quality
Software of the DRY precept: A neo_config_lock() helper operate for config.rs 4 an identical locks had been extracted to take away the plus poison restoration block. api_trait.rsimproves code maintainability and reduces duplication.
Clip suppression now documented: inline alignment feedback added to all gadgets #!(permit(clippy::...)) deletion of src/lib.rsdoc why sure linter warnings are deliberately disabled, and be sure that these choices are seen to future contributors.
API cleanup: lifeless nns area from RpcClient has been eliminated, unused macros have been cleaned up, and the general public API floor has been streamlined to scale back confusion about which options are actively supported.
Platform assist and availability
NeoRust v1.0.3 supplies pre-built binaries for a number of platforms.
- Linux:
neorust-linux-amd64.tar.gz - macOS:
neorust-macos-amd64.tar.gz - Home windows:
neorust-windows-amd64.zip
These binaries permit builders to make use of NeoRust's CLI instruments with out requiring a full Rust growth atmosphere.
Shortly after the v1.0.3 launch, the staff printed v1.0.4 to handle CI configuration and safety audit settings. This ensures that each one automated checks move efficiently, whereas correctly documenting advisories for identified dependencies, even with out an out there upstream repair.
compatibility
NeoRust v1.0.3 is suitable with Neo v3.9.1 and above, permitting builders to construct purposes that make the most of the most recent Neo N3 protocol options. Builders utilizing NeoRust ought to replace to this model to learn from improved error dealing with, elevated safety for cryptographic operations, and platform-specific fixes for credential storage on macOS and Home windows.
The newest model of NeoRust may be downloaded from the hyperlink beneath.
https://crates.io/crates/neo3

