forked from koniifer/ableos
checkpoint
This commit is contained in:
parent
c20376464e
commit
d90016f28e
36
Cargo.lock
generated
36
Cargo.lock
generated
|
@ -29,9 +29,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ahash"
|
name = "ahash"
|
||||||
version = "0.7.7"
|
version = "0.7.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd"
|
checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom",
|
"getrandom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
@ -40,16 +40,16 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ahash"
|
name = "ahash"
|
||||||
version = "0.8.6"
|
version = "0.8.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
|
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"const-random",
|
"const-random",
|
||||||
"getrandom",
|
"getrandom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"version_check",
|
"version_check",
|
||||||
"zerocopy 0.7.18",
|
"zerocopy 0.7.34",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -441,7 +441,7 @@ version = "0.12.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.7.7",
|
"ahash 0.7.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -450,14 +450,14 @@ version = "0.14.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
|
checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.6",
|
"ahash 0.8.11",
|
||||||
"allocator-api2",
|
"allocator-api2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbasm"
|
name = "hbasm"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#796a826cc5e99af341e0e0980c6f0b933896549c"
|
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#e494785f93dad2722ebd9e5d81c2bcb3c471cc07"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"paste",
|
"paste",
|
||||||
"rhai",
|
"rhai",
|
||||||
|
@ -467,16 +467,12 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbbytecode"
|
name = "hbbytecode"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/ableos/holey-bytes#247b2c6614ab81925e96744398632e3b7bb8b7ad"
|
source = "git+https://git.ablecorp.us/ableos/holey-bytes#e494785f93dad2722ebd9e5d81c2bcb3c471cc07"
|
||||||
dependencies = [
|
|
||||||
"paste",
|
|
||||||
"with_builtin_macros",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbvm"
|
name = "hbvm"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/ableos/holey-bytes#247b2c6614ab81925e96744398632e3b7bb8b7ad"
|
source = "git+https://git.ablecorp.us/ableos/holey-bytes#e494785f93dad2722ebd9e5d81c2bcb3c471cc07"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hbbytecode",
|
"hbbytecode",
|
||||||
]
|
]
|
||||||
|
@ -888,7 +884,7 @@ version = "1.18.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7a7d88770120601ba1e548bb6bc2a05019e54ff01b51479e38e64ec3b59d4759"
|
checksum = "7a7d88770120601ba1e548bb6bc2a05019e54ff01b51479e38e64ec3b59d4759"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.6",
|
"ahash 0.8.11",
|
||||||
"bitflags 2.4.1",
|
"bitflags 2.4.1",
|
||||||
"instant",
|
"instant",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
|
@ -1631,11 +1627,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy"
|
name = "zerocopy"
|
||||||
version = "0.7.18"
|
version = "0.7.34"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ede7d7c7970ca2215b8c1ccf4d4f354c4733201dfaaba72d44ae5b37472e4901"
|
checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zerocopy-derive 0.7.18",
|
"zerocopy-derive 0.7.34",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1651,9 +1647,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy-derive"
|
name = "zerocopy-derive"
|
||||||
version = "0.7.18"
|
version = "0.7.34"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4b27b1bb92570f989aac0ab7e9cbfbacdd65973f7ee920d9f0e71ebac878fd0b"
|
checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
ptr_sub_ptr,
|
ptr_sub_ptr,
|
||||||
custom_test_frameworks,
|
custom_test_frameworks,
|
||||||
naked_functions,
|
naked_functions,
|
||||||
|
pointer_is_aligned_to
|
||||||
)]
|
)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![test_runner(crate::test_runner)]
|
#![test_runner(crate::test_runner)]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"llvm-target": "x86_64-unknown-none",
|
"llvm-target": "x86_64-unknown-none",
|
||||||
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
|
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
|
||||||
"arch": "x86_64",
|
"arch": "x86_64",
|
||||||
"target-endian": "little",
|
"target-endian": "little",
|
||||||
"target-pointer-width": "64",
|
"target-pointer-width": "64",
|
||||||
|
|
|
@ -10,7 +10,7 @@ error-stack = "0.4"
|
||||||
fatfs = "0.3"
|
fatfs = "0.3"
|
||||||
toml = "0.5.2"
|
toml = "0.5.2"
|
||||||
hbasm.git = "https://git.ablecorp.us/AbleOS/holey-bytes.git"
|
hbasm.git = "https://git.ablecorp.us/AbleOS/holey-bytes.git"
|
||||||
|
# hblang.git = "https://git.ablecorp.us/AbleOS/holey-bytes.git"
|
||||||
|
|
||||||
[dependencies.reqwest]
|
[dependencies.reqwest]
|
||||||
version = "0.11"
|
version = "0.11"
|
||||||
|
|
32
repbuild/src/dev.rs
Normal file
32
repbuild/src/dev.rs
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
use std::process::exit;
|
||||||
|
pub struct Package {
|
||||||
|
name: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Package {
|
||||||
|
pub fn load_from_file(path: String) -> Self {
|
||||||
|
let contents = match std::fs::read_to_string(path.clone()) {
|
||||||
|
// If successful return the files text as `contents`.
|
||||||
|
// `c` is a local variable.
|
||||||
|
Ok(c) => c,
|
||||||
|
// Handle the `error` case.
|
||||||
|
Err(_) => {
|
||||||
|
// Write `msg` to `stderr`.
|
||||||
|
eprintln!("Could not read file `{}`", path);
|
||||||
|
// Exit the program with exit code `1`.
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
use toml::Value;
|
||||||
|
|
||||||
|
let mut data: Value = toml::from_str(&contents).unwrap();
|
||||||
|
let name = data
|
||||||
|
.get("package")
|
||||||
|
.unwrap()
|
||||||
|
.get("name")
|
||||||
|
.unwrap()
|
||||||
|
.to_string();
|
||||||
|
|
||||||
|
Self { name }
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,8 @@
|
||||||
|
mod dev;
|
||||||
|
|
||||||
use {
|
use {
|
||||||
derive_more::Display,
|
derive_more::Display,
|
||||||
|
dev::Package,
|
||||||
error_stack::{bail, report, Context, Report, Result, ResultExt},
|
error_stack::{bail, report, Context, Report, Result, ResultExt},
|
||||||
fatfs::{FileSystem, FormatVolumeOptions, FsOptions, ReadWriteSeek},
|
fatfs::{FileSystem, FormatVolumeOptions, FsOptions, ReadWriteSeek},
|
||||||
std::{
|
std::{
|
||||||
|
@ -136,6 +139,10 @@ fn get_fs() -> Result<FileSystem<impl ReadWriteSeek>, io::Error> {
|
||||||
|
|
||||||
let fs = FileSystem::new(img, FsOptions::new())?;
|
let fs = FileSystem::new(img, FsOptions::new())?;
|
||||||
|
|
||||||
|
let p = Package::load_from_file(
|
||||||
|
"/home/able/Projects/ableos/sysdata/programs/tests/meta.toml".to_owned(),
|
||||||
|
);
|
||||||
|
|
||||||
// Read the contents of the file using a `match` block
|
// Read the contents of the file using a `match` block
|
||||||
// to return the `data: Ok(c)` as a `String`
|
// to return the `data: Ok(c)` as a `String`
|
||||||
// or handle any `errors: Err(_)`.
|
// or handle any `errors: Err(_)`.
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2023-09-17"
|
channel = "nightly-2024-05-17"
|
||||||
components = ["rust-src", "llvm-tools"]
|
components = ["rust-src", "llvm-tools"]
|
||||||
|
|
11
sysdata/programs/tests/meta.toml
Normal file
11
sysdata/programs/tests/meta.toml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[package]
|
||||||
|
name = "tests"
|
||||||
|
authors = ["able"]
|
||||||
|
|
||||||
|
[dependants.libraries]
|
||||||
|
|
||||||
|
[dependants.binaries]
|
||||||
|
hblang.version = "1.0.0"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
command = "hblang libraries/stn/src/lib.hb src/main.hbl"
|
0
sysdata/programs/tests/src/main.hb
Normal file
0
sysdata/programs/tests/src/main.hb
Normal file
Loading…
Reference in a new issue