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>
13 lines
540 B
Rust
13 lines
540 B
Rust
// `thread_local!` with no space where the type meets the initializer: the lexer joins `>` and `=`
|
|
// into `>=` (and `>>` and `=` into `>>=`); rustc's macro matcher splits them, so both are valid.
|
|
use std::cell::RefCell;
|
|
thread_local! {
|
|
static ONE:RefCell<u32>=RefCell::new(1);
|
|
static TWO:RefCell<Vec<u32>>=const{RefCell::new(Vec::new())};
|
|
}
|
|
|
|
#[test]
|
|
fn joint_ge_and_shr_eq_split_at_the_initializer() {
|
|
ONE.with(|v| assert_eq!(*v.borrow(), 1));
|
|
TWO.with(|v| { v.borrow_mut().push(2); assert_eq!(*v.borrow(), vec![2]); });
|
|
}
|