Skip to main content

Crate skipcode

Crate skipcode 

Source
Expand description

§skipcode

A zero‑cost macro library that lets you skip statements / blocks at compile time (both debug and release). It works on no_std targets and provides a few convenience helpers.

The public API consists of:

  • skip! – unconditional skipping;
  • skip_if! – conditional skipping based on a compile‑time boolean;
  • skip_unless! – the opposite of skip_if!;
  • skip_debug! – run code only in debug builds.

The crate is deliberately tiny (≈ 100 LOC) and contains no unsafe code.

Macros§

skip
Skip code at compile time (Debug/Release compatible)
skip_debug
Execute the code only when debug_assertions are enabled (i.e. in debug builds). In release builds the code is omitted.
skip_if
Skip code if condition is true (compile‑time)
skip_unless
Skip the following code unless the condition is true (i.e. the opposite of skip_if!).