The JIT that runs makepad apps from source: lexer, front end, type checker, lazy borrow checker (Gandalf; `--check-first` opts in), codegen, session and warm/cold caches keyed by compiler stamp, provided crates bound late, startup images, live patching. User-facing name is `makepad run` (binary `makepad`, MAKEPAD_RUN_* env, ~/.makepad-run); libs/relax stays the internal library name. `makepad check` reports rustc-style diagnostics with rustc error codes and checks a whole workspace (`--workspace`). Runs on macOS, Linux, Windows and Android. makepad-remote: one tool schema for apps and the WM (app/1): grabs, captures, traces, frame profiles and tweaks. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
28 lines
820 B
Rust
28 lines
820 B
Rust
// A `#[macro_export]` macro_rules! that a macro expansion defines inside a module, re-exported
|
|
// there under another name and imported again (makepad-draw's DrawShader derive output does
|
|
// this): the imports bind the macro, and calls through the paths and the aliases resolve.
|
|
#[macro_export]
|
|
macro_rules! make {
|
|
($name:ident, $d:tt) => {
|
|
#[doc(hidden)]
|
|
#[macro_export]
|
|
macro_rules! $name {
|
|
($d x:expr) => { $d x + 1 };
|
|
}
|
|
};
|
|
}
|
|
pub mod rt {
|
|
pub use crate::make;
|
|
}
|
|
use crate::rt as runtime_alias;
|
|
mod m {
|
|
super::runtime_alias::make!(__gen_abc, $);
|
|
pub use __gen_abc as ancestry;
|
|
}
|
|
use m::ancestry as base_alias;
|
|
#[test]
|
|
fn macro_export_use() {
|
|
assert_eq!(__gen_abc!(1), 2);
|
|
assert_eq!(base_alias!(41), 42);
|
|
assert_eq!(m::ancestry!(41), 42);
|
|
}
|