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>
29 lines
1.2 KiB
Rust
29 lines
1.2 KiB
Rust
//! rustc can check the fixture UIs, but only the Relax host supplies sandboxed modules.
|
|
//! Refuse loads explicitly; never substitute the native oracle for runtime code.
|
|
#![allow(dead_code)]
|
|
|
|
const UNAVAILABLE: &str = "run-time modules require makepad run; run this fixture with makepad run";
|
|
|
|
#[derive(Clone, Copy)]
|
|
pub struct Module { _private: () }
|
|
#[derive(Clone, Copy, PartialEq, Eq)]
|
|
pub enum Edit { Patched, NeedsReload }
|
|
#[derive(Clone, Copy, PartialEq, Eq)]
|
|
pub enum Stream { Applied { kept: usize }, Incomplete, Pending, NeedsReload }
|
|
|
|
impl Module {
|
|
pub fn load_source(_: &str, _: &str, _: &str, _: &[&str]) -> Result<Self, String> {
|
|
Err(UNAVAILABLE.into())
|
|
}
|
|
pub fn load_stream(_: &str, _: &str, _: &str, _: &[&str]) -> Result<Self, String> {
|
|
Err(UNAVAILABLE.into())
|
|
}
|
|
pub fn get<T>(self, _: &str) -> Result<T, String> { Err(UNAVAILABLE.into()) }
|
|
pub fn stream(self, _: &str) -> Result<Stream, String> { Err(UNAVAILABLE.into()) }
|
|
pub fn finish_stream(self, _: &str) -> Result<Edit, String> { Err(UNAVAILABLE.into()) }
|
|
pub fn unload(self) {}
|
|
}
|
|
|
|
pub fn guard<T>(_: u64, _: impl FnOnce() -> T) -> Result<T, String> {
|
|
Err(UNAVAILABLE.into())
|
|
}
|