hax icon indicating copy to clipboard operation
hax copied to clipboard

Inlining of a macro call comming from another macro expansion

Open W95Psp opened this issue 2 years ago • 1 comments

Consider the following macro public_bytes from the Hacspec lib:

macro_rules! public_bytes {
    ($name:ident, $l:expr) => {
        array!($name, $l, u8);
    };
}

This macro is really just a helper macro that wraps a call to the more "primitive" macro array, that Hax handles in a special way.

We don't want to handle public_bytes in a special way --clients might actually define such wrappers themselves, and so we'd need to expand public_bytes once and stop there. Our approach to inlining macro calls cannot handle that at all.

I think this issue adds a motivation against having macros that encode some kinds of DSLs. (like hacspec lib does)

W95Psp avatar May 30 '23 10:05 W95Psp

Waiting on #145

W95Psp avatar Apr 18 '24 11:04 W95Psp

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Oct 18 '24 02:10 github-actions[bot]

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Mar 13 '25 01:03 github-actions[bot]

We will remove all legacy hacspec lib code.

franziskuskiefer avatar Mar 13 '25 11:03 franziskuskiefer