-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 408f351
Showing
19 changed files
with
564 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[alias] | ||
xtask = "run --quiet --package xtask --" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ "main", "master" ] | ||
pull_request: | ||
branches: [ "main", "master" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
run: cargo build --verbose | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
|
||
- name: Clippy | ||
run: cargo clippy -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/target | ||
.idea | ||
Cargo.lock | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# MIT License | ||
|
||
## Copyright (c) 2024 Caznix | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE.** |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"engine", | ||
"editor", | ||
"xtask" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "editor" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
floem = "0.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use floem::{prelude::*, style::Style}; | ||
|
||
fn main() { | ||
floem::launch(counter_view); | ||
} | ||
|
||
fn counter_view() -> impl IntoView { | ||
let mut counter = RwSignal::new(20); | ||
v_stack({ | ||
label("test") | ||
}).style(Style::d); | ||
h_stack(( | ||
button("Increment").action(move || counter += 1), | ||
label(move || format!("Value: {counter}")), | ||
button("Decrement").action(move || counter -= 1), | ||
)) | ||
.style(|s| s.size_full().items_center().justify_center().gap(10)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "zenyx" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
chrono = "0.4.38" | ||
colored = "2.1.0" | ||
lazy_static = "1.5.0" | ||
#log = "0.4.22" | ||
log2 = "0.1.14" | ||
parking_lot = "0.12.3" | ||
reedline = "0.37.0" | ||
regex = "1.11.1" | ||
thiserror = "2.0.3" | ||
tokio = { version = "1.41.1", features = ["macros", "rt", "rt-multi-thread"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use std::process::Command; | ||
|
||
use log2::{debug, info}; | ||
|
||
use crate::core::repl::COMMAND_LIST; | ||
|
||
pub fn say_hello() { | ||
println!("Hello from your new command!"); | ||
} | ||
|
||
pub fn echo(args: Vec<String>) { | ||
debug!("{}", args.join(" ")); | ||
println!("{}", args.join(" ")) | ||
} | ||
|
||
pub fn exit() { | ||
debug!("Exiting..."); | ||
std::process::exit(0) | ||
} | ||
pub fn clear() { | ||
info!("Clearing screen..., running command"); | ||
let _result = if cfg!(target_os = "windows") { | ||
debug!("target_os is windows"); | ||
Command::new("cmd").args(["/c", "cls"]).spawn() | ||
} else { | ||
debug!("target_os was unix"); | ||
// "clear" or "tput reset" | ||
Command::new("tput").arg("reset").spawn() | ||
}; | ||
} | ||
pub fn cmds() { | ||
println!("Commands:"); | ||
for cmd in COMMAND_LIST.commands.read().iter() { | ||
println!("{:#}", cmd); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod commands; | ||
pub mod repl; | ||
pub mod splash; |
Oops, something went wrong.