Nymlib Rust workspace designed to make it easier to build applications on top of the Nym mixnet

Nymlib Rust workspace designed to make it easier to build applications on top of the Nym mixnet
none 0.0 0

I’m announching nymlib, a new Rust workspace designed to make it easier to build applications on top of the Nymmixnet.

nymlib brings together multiple foundational libraries under one roof. Each crate can be used independently or together, with nymlib serving as a unifying export layer. It currently includes:

nymsocket — high-level socket abstraction over nymsdk for easier Nym mixnet integration

crypto — secure key generation, encryption, decryption, signing, and verification (ECDSA, RSA, ECDHE)

serialize — flexible, compact serialization framework with conditional fields and hash support

serialize_derive — procedural macros for generating serialization/deserialization code

With nymlib, you can start building Rust applications that interact with the Nym mixnet more easily. For example, you can:

  • Send and receive messages over the Nym network using nymsocket
  • Manage keys, encrypt/decrypt data, and sign or verify messages with crypto
  • Serialize and deserialize complex data structures efficiently with serialize and serialize_derive
  • Combine these tools to create privacy-preserving apps, experiments, or prototypes on Nym

I should mention that I’m not an expert Rust programmer — these libraries started as tools I built locally for my own experimental projects. I decided to share them in case they might be useful to others.

From my side, I’ll keep working to improve nymlib and add new features over time. Pull requests, suggestions, or any kind of feedback are very welcome — I’d be grateful for any ideas that could help make it better.

GitHub - valansai/nymlib

5 Likes

Hey, this is really cool stuff!

I’m working on something in a similar direction re the socket which might be of interest to look at: nym/sdk/rust/nym-sdk/src/stream_wrapper at max/sdk-streamer · nymtech/nym · GitHub

Ideally (my idea anyway) is to try and make it generic enough to be putting into e.g. HTTP crates, and totally abstracting the Mixnet away (there is a very rough sketch of a smoltcp::Device on that branch as well - nym/smolmix at max/sdk-streamer · nymtech/nym · GitHub - which might be of interest).

Hi, Max, thanks. Your idea is pretty much interested, we need it.

I’m using nymlib to implement https://forum.nym.com/t/open-source-p2p-network-built-on-nym-mixnet/ I would like to hear your thoughts.

we need it.

Thanks - this way we can move to supporting existing stuff that e.g. wants to do TLS without having to make any changes upstream, which I think is quite exciting for then making real dropins.

Look forward to having a look at it!

1 Like