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:
parent
c32e763e11
commit
6e2f937026
3 changed files with 169 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue