forked from koniifer/ableos
fixing some warnings
This commit is contained in:
parent
e335e55aa0
commit
433f2db4d1
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -200,6 +200,10 @@ dependencies = [
|
|||
"with_builtin_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hblang"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "hbvm"
|
||||
version = "0.1.0"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[workspace]
|
||||
resolver = "2"
|
||||
members = ["hbasm", "hbbytecode", "hbvm", "hbvm_aos_on_linux", "hbxrt", "xtask"]
|
||||
members = ["hbasm", "hbbytecode", "hblang", "hbvm", "hbvm_aos_on_linux", "hbxrt", "xtask"]
|
||||
|
|
|
@ -4,7 +4,7 @@ use {
|
|||
std::{cell::RefCell, rc::Rc},
|
||||
};
|
||||
|
||||
mod optypes {
|
||||
pub mod optypes {
|
||||
use {
|
||||
crate::{
|
||||
label::UnboundLabel,
|
||||
|
@ -101,7 +101,7 @@ mod optypes {
|
|||
use crate::data::DataRef;
|
||||
}
|
||||
|
||||
mod rity {
|
||||
pub mod rity {
|
||||
pub use super::optypes::{A, O, P, R};
|
||||
pub type B = i64;
|
||||
pub type H = i64;
|
||||
|
@ -109,7 +109,7 @@ mod rity {
|
|||
pub type D = i64;
|
||||
}
|
||||
|
||||
mod generic {
|
||||
pub mod generic {
|
||||
use {crate::object::Object, rhai::EvalAltResult};
|
||||
|
||||
pub(super) fn convert_op<A, B>(from: A) -> Result<B, EvalAltResult>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
mod data;
|
||||
mod ins;
|
||||
mod label;
|
||||
mod linker;
|
||||
mod object;
|
||||
pub mod data;
|
||||
pub mod ins;
|
||||
pub mod label;
|
||||
pub mod linker;
|
||||
pub mod object;
|
||||
|
||||
use {
|
||||
object::Object,
|
||||
|
|
8
hblang/Cargo.toml
Normal file
8
hblang/Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "hblang"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
14
hblang/src/lib.rs
Normal file
14
hblang/src/lib.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
pub fn add(left: usize, right: usize) -> usize {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
|
@ -3,13 +3,10 @@ name = "hbvm"
|
|||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
||||
[features]
|
||||
default = ["alloc"]
|
||||
alloc = []
|
||||
nightly = []
|
||||
|
||||
[dependencies]
|
||||
hbbytecode.path = "../hbbytecode"
|
||||
hbbytecode = { path = "../hbbytecode" }
|
||||
|
|
Loading…
Reference in a new issue