shapely 2.0.1

One trait for reflection, serialization, deserialization
Documentation

shapely

experimental free of syn crates.io documentation MIT/Apache-2.0 licensed

[!IMPORTANT]

There is no stable shapely API as of now (even though it's >1.0.0). The design is very much still being explored.

Expect multiple major versions in the near future — (note left 2025-03-11)

shapely provides runtime reflection for Rust.

Any type that implements Shapely trait returns a Shape, which describes:

  • The memory layout of the type
  • Its innards: struct fields, underlying type for newtypes, etc.
  • How to invoke its Display/Debug implementation
  • How to drop it in place

The Partial type is able to allocate (or work from a &mut MaybeUninit<T>) any Shapely type, and gradually initialize its fields — until the fully-built value is moved out of the partial.

It comes with a derive macro that uses unsynn for speed of compilation.

License

Licensed under either of:

at your option.