5 releases

0.1.6 Mar 13, 2024
0.1.5 Mar 8, 2024
0.1.2 Feb 24, 2024

#1301 in Procedural macros

Download history 63/week @ 2024-02-11 325/week @ 2024-02-18 122/week @ 2024-02-25 368/week @ 2024-03-03 260/week @ 2024-03-10 21/week @ 2024-03-17 1/week @ 2024-03-24 123/week @ 2024-03-31

444 downloads per month
Used in naumi

MIT license

12KB
210 lines

Naumi

Lightweight and fast data transfer protocol. Fast de/serialization and tiny size!

📌 Why?

Naumi is an innovative data format designed to be a complete alternative to JSON and ProtoBuf, while providing greater efficiency and flexibility. It is designed to meet modern data processing requirements, offering compact serialization, improved read and write speeds, and support for complex data structures and types, making it an ideal choice for a wide range of applications, from webAPIs to real-time messaging and configuration files.

🚀 Benchmarks

Benchmark sources: Benchmarks

Encode Decode Size
Naumi 6,4 ms 6,8 ms 15002002
Alkahest 24,3 ms 22,7 ms 15008008
Pot 72,64 ms 187,9 ms 23994125
Cbor 40,8 ms 115,2 ms 31904769
SimdJson 107,6 ms 466,3 ms 62543210

📝 To Do (before the 1.0.0 release)

  • Describe the functions with examples.
  • Data compression using zstd.
  • More benchmarks.
  • More examples.
  • More speed and optimization!
    • Huge speedup of iterators and custom types.
    • Huge speedup of numbers decode.
    • Let me know on the issues page.
  • More supported data types:

📦 Currently supported types

Numbers: u8, u16, u32, u64, usize, u128, f32, f64, VarInt // and signed

Strings: String(VarInt), TinyString(u8), ShortString(u16), MediumString(u32), LongString(u64)

Iters: Vec(VarInt), TinyVec(u8), ShortVec(u16), MediumVec(u32), LongVec(u64), HashSet(VarInt), HashMap(VarInt)

Custom: Structs(Named/Unnamed), Enums, Option

🔧 Install

  • Standart
naumi = "0.3"
  • All
naumi = { version = "0.3", features = ["net", "net_async", "default_", "clone", "debug", "partial_eq"] }

✊ Examples

Check it out on GitHub - Examples

📋 Update log

  • 0.3.2 - usize and isize are now always 64 bits.
  • 0.3.1 - Moving the examples from the Readme.
  • 0.3.0 - Ease of use and some bug fixes. Removed Coder.
  • 0.2.5 - 0.2.7 - Bug fixes and some changes.
  • 0.2.4 - Added benchmarks.
  • 0.2.3 - Accelerating the decode of numbers.
  • 0.2.2 - Bug fixes
  • 0.2.1 - Describe the functions with examples.
  • 0.2.0 - Hugely accelerated iterators and custom structures, bug fixes.
  • 0.1.0 - 0.1.5 - Bug fixes

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

❤️ Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2024 Paradist. This project is MIT licensed.

Dependencies

~1–1.7MB
~36K SLoC