Ben Chuanlong Du's Blog

It is never too late to learn.

Binary Serialization Format

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Summary

  1. Protobuf is best for message serialization. Some companies (e.g., Google) also use it extensively for disk serialization.

  2. FlatBuffers has better CPU performance.

  3. Apache Parquet is the most popular binary …

Make a Rust Project Both a Library and a Binary

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

.
├── Cargo.toml
└── src
    ├── main.rs
    │   
    └── lib.rs
[package]
name = "package_name"
version = "0.0.1"
authors = ["me <me@gmail.com>"]

[lib]
name = "lib_name"
path = "src/lib.rs"

[[bin]]
name = "binary_name"
path = "src …