core: add Null backend to show what implementing a backend looks like

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-07-13 15:47:11 -07:00
parent c32e763e11
commit 6e2f937026
3 changed files with 169 additions and 4 deletions

View file

@ -277,9 +277,11 @@ pub const Platform = enum {
wayland,
web,
win32,
null,
pub fn fromTarget(target: std.Target) Platform {
if (target.cpu.arch == .wasm32) return .web;
if (target.os.tag == .windows) return .win32;
return .x11;
}
};