Module pdl_compiler::backends::rust_no_allocation

source ·
Expand description

Rust no-allocation backend

The motivation for this backend is to be a more “idiomatic” backend than the existing backend. Specifically, it should

  1. Use lifetimes, not reference counting
  2. Avoid expensive memory copies unless needed
  3. Use the intermediate Schema rather than doing all the logic from scratch

One notable consequence is that we avoid .specialize(), as it has “magic” behavior not defined in the spec. Instead we mimic the C++ approach of calling tryParse() and getting a Result<> back.

Modules§

Functions§