wincode is a Rust binary serialization library designed for high-performance, in-place deserialization and direct memory writes. It provides a drop-in, configurable alternative to bincode with the same default wire format, but adds compile-time configuration (endianness, integer encoding, length encoding, tag encoding) through const generics, eliminating runtime overhead. The library exposes `SchemaWrite` and `SchemaRead` traits with derive macros (`SchemaWrite`, `SchemaRead`, `UninitBuilder`) that generate optimized serialization/deserialization code, including `MaybeUninit`-based builders for initializing structs without intermediate copies. The architecture is layered: a `Reader`/`Writer` I/O abstraction with trusted-window optimizations (eliding bounds checks for known-size blocks), a schema layer mapping types to `TypeMeta` (static size and zero-copy eligibility), and a config layer that composes compile-time parameters. Unsafe code is pervasive but carefully isolated in unchecked slice readers/writers, zero-copy lifetimes (`ZeroCopy` trait), and unconditional `UninitBuilder` logic. Fuzzing, proptest-based property testing, Miri validation, and security audits by Neodyme, OtterSec, and Asymmetric Research ensure correctness under adversarial inputs. The library is actively maintained by Anza (Solana) and is used in performance-critical Solana infrastructure. It supports `no_std` + `alloc`, and integrates with external types like `bumpalo`, `bv`, `bytes`, `ecow`, `indexmap`, `smallvec`, and `uuid`. The codebase exhibits strong engineering craftsmanship but requires a high MSRV (1.89) and has a heavy reliance on unsafe that demands rigorous auditing. Overall, it is a well-architected, production-grade serialization library.
This is a Rust library implementing the Polyanya any-angle pathfinding algorithm on navigation meshes. It provides a core `Mesh` struct that supports 2D and 3D pathfinding with multiple overlapping layers, agent radius, and path simplification. The library includes several input formats: custom `.mesh` files (v2/v3), Recast JSON navigation meshes, triangulated meshes from outer edges and obstacles (via CDT), and trimesh files. It features an optimized A* search with chained expansions, geometric predicates for cone clipping and vertex snapping, and precomputed BVH for efficient point location. The repository contains extensive benchmarks, fuzz tests, and example binaries (including a scenario runner and traced profiling examples). It is structured as a reusable library with optional features like async, serde, stats, tracing, and Recast import. The code demonstrates strong engineering practices with careful handling of floating-point edge cases and performance-critical sections using `SmallVec` and `unsafe` indexing.