Re: [PATCH v2] rust: bindings: rename const binding using sed

From: Miguel Ojeda
Date: Wed Dec 13 2023 - 14:42:47 EST


On Sat, Nov 4, 2023 at 3:58 PM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> This patch changes the way we define constant helpers to
>
> const <TYPE> RUST_CONST_HELPER_<NAME> = <NAME>;
>
> and then use `sed` to postprocess Rust code by generated by bindgen to
> remove the distinct prefix, so user of the binding crate can refer to
> the name directly.
>
> Reviewed-by: Benno Lossin <benno.lossin@xxxxxxxxx>
> Reviewed-by: Andreas Hindborg <a.hindborg@xxxxxxxxxxx>
> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>
> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>

Applied to `rust-next` (reworded for typos and with Benno's `^`
suggestion -- we can always relax it back later if needed, the output
is currently the same).

Thanks everyone!

Cheers,
Miguel