mirror of
https://github.com/Dummi26/mers.git
synced 2025-12-15 11:46:16 +01:00
moved Cargo.toml and src/ to /mers/Cargo.toml and /mers/src/ because rust-analyzer was apparently very confused when I was trying to edit projects in mers_libs/*/.
This commit is contained in:
0
mers_libs/gui_v1/Cargo.lock
generated
Normal file → Executable file
0
mers_libs/gui_v1/Cargo.lock
generated
Normal file → Executable file
2
mers_libs/gui_v1/Cargo.toml
Normal file → Executable file
2
mers_libs/gui_v1/Cargo.toml
Normal file → Executable file
@@ -7,4 +7,4 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
iced = { version = "0.8.0", features = ["smol"] }
|
||||
mers = { path = "../../" }
|
||||
mers = { path = "../../mers/" }
|
||||
|
||||
0
mers_libs/gui_v1/src/main.rs
Normal file → Executable file
0
mers_libs/gui_v1/src/main.rs
Normal file → Executable file
49
mers_libs/http_requests/Cargo.lock
generated
Normal file
49
mers_libs/http_requests/Cargo.lock
generated
Normal file
@@ -0,0 +1,49 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http_requests"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"mers",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||
|
||||
[[package]]
|
||||
name = "mers"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
||||
9
mers_libs/http_requests/Cargo.toml
Executable file
9
mers_libs/http_requests/Cargo.toml
Executable file
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "http_requests"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
mers = { path = "../../mers/" }
|
||||
29
mers_libs/http_requests/src/main.rs
Executable file
29
mers_libs/http_requests/src/main.rs
Executable file
@@ -0,0 +1,29 @@
|
||||
fn main() {
|
||||
let (mut my_lib, mut run) = MyLib::new(
|
||||
"GUI-Iced".to_string(),
|
||||
(0, 0),
|
||||
"A basic GUI library for mers.".to_string(),
|
||||
vec![(
|
||||
"http_get".to_string(),
|
||||
vec![VSingleType::String],
|
||||
VType {
|
||||
types: vec![VSingleType::Tuple(vec![]), VSingleType::String],
|
||||
},
|
||||
)],
|
||||
);
|
||||
let mut stdin = std::io::stdin().lock();
|
||||
let mut stdout = std::io::stdout().lock();
|
||||
let mut layout = Layout::Row(vec![]);
|
||||
loop {
|
||||
run = match my_lib.run(run, &mut stdin, &mut stdout) {
|
||||
MyLibTask::None(v) => v,
|
||||
MyLibTask::RunFunction(mut f) => {
|
||||
let return_value = match f.function {
|
||||
0 => VDataEnum::List(VSingleType::Int.to(), vec![]).to(),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
f.done(&mut stdout, return_value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user