From 9ec3bb1f99ee736399afa8c25cd8a4bcffd0c505 Mon Sep 17 00:00:00 2001 From: Able Date: Sat, 20 Jul 2024 12:54:58 -0500 Subject: [PATCH] fix --- Cargo.lock | 6 +++--- repbuild/src/dev.rs | 2 -- sysdata/libraries/ignim/README.md | 2 ++ sysdata/libraries/ignim/src/lib.hb | 7 +++++++ sysdata/libraries/stn/src/buffer.hb | 2 +- sysdata/libraries/stn/src/lib.hb | 2 +- sysdata/libraries/stn/src/log.hb | 2 +- sysdata/libraries/stn/src/memory.hb | 2 +- sysdata/libraries/stn/src/string.hb | 2 +- sysdata/libraries/windo/README.md | 2 ++ sysdata/libraries/windo/src/element.hb | 14 ++++++++++++++ sysdata/libraries/windo/src/frame.hb | 0 sysdata/libraries/windo/src/lib.hb | 14 ++++++++++++++ sysdata/libraries/windo/src/text.hb | 3 +++ sysdata/programs/fb_driver/src/main.hb | 2 +- sysdata/programs/tests/src/main.hb | 6 ++++-- sysdata/programs/time_driver/src/main.hb | 2 +- 17 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 sysdata/libraries/ignim/README.md create mode 100644 sysdata/libraries/ignim/src/lib.hb create mode 100644 sysdata/libraries/windo/README.md create mode 100644 sysdata/libraries/windo/src/element.hb create mode 100644 sysdata/libraries/windo/src/frame.hb create mode 100644 sysdata/libraries/windo/src/lib.hb create mode 100644 sysdata/libraries/windo/src/text.hb diff --git a/Cargo.lock b/Cargo.lock index 5c7e1ae4..f7f8ecac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -429,7 +429,7 @@ dependencies = [ [[package]] name = "hbbytecode" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#5555b9865a3ae9d512bc338c1f370aeca9975c60" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#5a6474f06628d80386cdc4c09d443da9118ccfca" [[package]] name = "hbbytecode" @@ -439,7 +439,7 @@ source = "git+https://git.ablecorp.us/ableos/holey-bytes#e494785f93dad2722ebd9e5 [[package]] name = "hblang" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#5555b9865a3ae9d512bc338c1f370aeca9975c60" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#5a6474f06628d80386cdc4c09d443da9118ccfca" dependencies = [ "hbvm 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)", ] @@ -447,7 +447,7 @@ dependencies = [ [[package]] name = "hbvm" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#5555b9865a3ae9d512bc338c1f370aeca9975c60" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#5a6474f06628d80386cdc4c09d443da9118ccfca" dependencies = [ "hbbytecode 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)", ] diff --git a/repbuild/src/dev.rs b/repbuild/src/dev.rs index 46d7dc49..5c92480e 100644 --- a/repbuild/src/dev.rs +++ b/repbuild/src/dev.rs @@ -70,7 +70,6 @@ impl Package { let mut bytes = Vec::new(); // compile here - println!("Precompilation"); let _ = hblang::run_compiler( &path, Options { @@ -80,7 +79,6 @@ impl Package { &mut bytes, ); let _ = hblang::run_compiler(&path, Default::default(), &mut bytes); - println!("Post-compilation"); match std::fs::create_dir("target/programs") { Ok(_) => (), diff --git a/sysdata/libraries/ignim/README.md b/sysdata/libraries/ignim/README.md new file mode 100644 index 00000000..340e3778 --- /dev/null +++ b/sysdata/libraries/ignim/README.md @@ -0,0 +1,2 @@ +# Ignim +Ignim is the ableOS vulkan interface library. \ No newline at end of file diff --git a/sysdata/libraries/ignim/src/lib.hb b/sysdata/libraries/ignim/src/lib.hb new file mode 100644 index 00000000..161d851a --- /dev/null +++ b/sysdata/libraries/ignim/src/lib.hb @@ -0,0 +1,7 @@ +VK_VERSION_MAJOR := 1; +VK_VERSION_MINOR := 0; + +init_vulkan := fn(): void { + + return +} \ No newline at end of file diff --git a/sysdata/libraries/stn/src/buffer.hb b/sysdata/libraries/stn/src/buffer.hb index b29bf3f0..f252b07a 100644 --- a/sysdata/libraries/stn/src/buffer.hb +++ b/sysdata/libraries/stn/src/buffer.hb @@ -16,4 +16,4 @@ create := fn(): int { msg_length := string.length(msg); *msg = 0 return @eca(int, 1, 0, msg, msg_length) -} +} \ No newline at end of file diff --git a/sysdata/libraries/stn/src/lib.hb b/sysdata/libraries/stn/src/lib.hb index fd27a716..e8b9ef39 100644 --- a/sysdata/libraries/stn/src/lib.hb +++ b/sysdata/libraries/stn/src/lib.hb @@ -1,4 +1,4 @@ string := @use("rel:string.hb") log := @use("rel:log.hb") memory := @use("rel:memory.hb") -buffer := @use("rel:buffer.hb") +buffer := @use("rel:buffer.hb") \ No newline at end of file diff --git a/sysdata/libraries/stn/src/log.hb b/sysdata/libraries/stn/src/log.hb index ebf3e8ab..f336c56b 100644 --- a/sysdata/libraries/stn/src/log.hb +++ b/sysdata/libraries/stn/src/log.hb @@ -11,4 +11,4 @@ error := fn(message: ^u8): void return log(message, 0) warn := fn(message: ^u8): void return log(message, 1) info := fn(message: ^u8): void return log(message, 2) debug := fn(message: ^u8): void return log(message, 3) -trace := fn(message: ^u8): void return log(message, 4) +trace := fn(message: ^u8): void return log(message, 4) \ No newline at end of file diff --git a/sysdata/libraries/stn/src/memory.hb b/sysdata/libraries/stn/src/memory.hb index 76b3484d..c3dddcb6 100644 --- a/sysdata/libraries/stn/src/memory.hb +++ b/sysdata/libraries/stn/src/memory.hb @@ -15,4 +15,4 @@ release_page := fn(ptr: ^u8, page_count: u8): void { *msg_ptr = ptr return @eca(void, 3, 2, msg, 12) -} +} \ No newline at end of file diff --git a/sysdata/libraries/stn/src/string.hb b/sysdata/libraries/stn/src/string.hb index d23f3bd8..260b03a7 100644 --- a/sysdata/libraries/stn/src/string.hb +++ b/sysdata/libraries/stn/src/string.hb @@ -48,4 +48,4 @@ reverse := fn(s: ^u8): void { set := fn(change: ^u8, new: int): void { *change = new return -} +} \ No newline at end of file diff --git a/sysdata/libraries/windo/README.md b/sysdata/libraries/windo/README.md new file mode 100644 index 00000000..4fb7d395 --- /dev/null +++ b/sysdata/libraries/windo/README.md @@ -0,0 +1,2 @@ +# Pinnacle +Pinnacle is the windowing system api for ableOS \ No newline at end of file diff --git a/sysdata/libraries/windo/src/element.hb b/sysdata/libraries/windo/src/element.hb new file mode 100644 index 00000000..76299cce --- /dev/null +++ b/sysdata/libraries/windo/src/element.hb @@ -0,0 +1,14 @@ +Element := struct { + width: int, + height: int, + + x: u16, + y: u16, + + id: int, +} + +create_element := fn(): Element { + return Element.(0, 0, 0, 0, 0) +} + diff --git a/sysdata/libraries/windo/src/frame.hb b/sysdata/libraries/windo/src/frame.hb new file mode 100644 index 00000000..e69de29b diff --git a/sysdata/libraries/windo/src/lib.hb b/sysdata/libraries/windo/src/lib.hb new file mode 100644 index 00000000..e0a222c9 --- /dev/null +++ b/sysdata/libraries/windo/src/lib.hb @@ -0,0 +1,14 @@ +create_window := fn(): WindowID { + return WindowID.(1, 2) +} + +WindowID := struct { + host_id: int, + window_id: int, +} + +/* +update_ui := fn(window_id: WindowID): bool { + return 1 == 0 +} +*/ \ No newline at end of file diff --git a/sysdata/libraries/windo/src/text.hb b/sysdata/libraries/windo/src/text.hb new file mode 100644 index 00000000..22996c3d --- /dev/null +++ b/sysdata/libraries/windo/src/text.hb @@ -0,0 +1,3 @@ +ui_lisp_text_example := "(text id_1)\0"; + + diff --git a/sysdata/programs/fb_driver/src/main.hb b/sysdata/programs/fb_driver/src/main.hb index 306a3c94..a6483dc8 100644 --- a/sysdata/programs/fb_driver/src/main.hb +++ b/sysdata/programs/fb_driver/src/main.hb @@ -12,4 +12,4 @@ main := fn(): int { } } return 0 -} +} \ No newline at end of file diff --git a/sysdata/programs/tests/src/main.hb b/sysdata/programs/tests/src/main.hb index 0d695ea0..3e3d3551 100644 --- a/sysdata/programs/tests/src/main.hb +++ b/sysdata/programs/tests/src/main.hb @@ -1,6 +1,8 @@ stn := @use("../../../libraries/stn/src/lib.hb"); .{log, string, memory, buffer} := stn +windo := @use("../../../libraries/windo/src/lib.hb"); +.{WindowID, create_window} := windo service_search := fn(): void { a := "\{01}\0" @@ -19,10 +21,10 @@ main := fn(): int { log.info("abc\0") memory.release_page(memory_pages, 3) - window := windo.create_window() + window := create_window() // todo: abstract this out port_str := "\0\{70}\0" a := @eca(u8, 3, 3, port_str, 2) return 0 -} +} \ No newline at end of file diff --git a/sysdata/programs/time_driver/src/main.hb b/sysdata/programs/time_driver/src/main.hb index 6b2c4825..4e7d43c5 100644 --- a/sysdata/programs/time_driver/src/main.hb +++ b/sysdata/programs/time_driver/src/main.hb @@ -18,4 +18,4 @@ main := fn(): void { td := s.display_int(a, page) log.debug(td) return -} +} \ No newline at end of file