Back to rust
This commit is contained in:
@@ -26,3 +26,10 @@ target
|
||||
/target
|
||||
|
||||
.mist
|
||||
|
||||
|
||||
# Added by cargo
|
||||
#
|
||||
# already existing elements were commented out
|
||||
|
||||
#/target
|
||||
|
||||
Generated
-7
@@ -5,10 +5,3 @@ version = 4
|
||||
[[package]]
|
||||
name = "pulse-trader"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"pulse-ui",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pulse-ui"
|
||||
version = "0.1.0-alpha.0"
|
||||
|
||||
-11
@@ -3,15 +3,4 @@ name = "pulse-trader"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[workspace]
|
||||
members = ["pulse-ui"]
|
||||
|
||||
[workspace.dependencies]
|
||||
pulse-ui = { path = "pulse-ui", version = "0.1.0-alpha.0" }
|
||||
|
||||
[dependencies]
|
||||
pulse-ui = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "pulse-trader"
|
||||
path = ".mist/src/main.rs"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# pulse-trader
|
||||
A high-performance algorithmic crypto trading engine with backtesting, paper trading, and live execution support. Built with Mist
|
||||
A high-performance algorithmic crypto trading engine with backtesting, paper trading, and live execution support.
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[package]
|
||||
name = "pulse-ui"
|
||||
version = "0.1.0-alpha.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
|
||||
[lib]
|
||||
name = "pulse_ui"
|
||||
path = ".mist/src/lib.rs"
|
||||
@@ -1,3 +0,0 @@
|
||||
package = "lib.mist"
|
||||
packages = []
|
||||
include = []
|
||||
@@ -1,3 +0,0 @@
|
||||
pub void test() {
|
||||
println!("Hello, World");
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
pub module render_scope;
|
||||
|
||||
pub class RenderScope
|
||||
{
|
||||
u16 x = 0;
|
||||
u16 y = 0;
|
||||
u16 width = 0;
|
||||
u16 height = 0;
|
||||
|
||||
pub constructor() {}
|
||||
}
|
||||
|
||||
pub class RenderStack
|
||||
{
|
||||
pub Vec<RenderScope> stack;
|
||||
|
||||
pub constructor()
|
||||
{
|
||||
self.stack = Vec::new();
|
||||
}
|
||||
|
||||
pub RenderScope pop(&mut self)
|
||||
{
|
||||
self.stack.pop().expect("Failed to pop, no more items in the stack")
|
||||
}
|
||||
|
||||
pub RenderScope mut'a& push<'a>(&'a mut self)
|
||||
{
|
||||
self.stack.push_mut(RenderScope::new())
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
pub module units;
|
||||
|
||||
pub enum Position
|
||||
{
|
||||
Char(u16);
|
||||
ScreenUnits { u16 units; u16 div; };
|
||||
Percent(u16);
|
||||
Center;
|
||||
End;
|
||||
}
|
||||
|
||||
pub enum Size
|
||||
{
|
||||
Char(u16);
|
||||
ScreenUnits { u16 units; u16 div; };
|
||||
Percent(u16);
|
||||
Full;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
pub module text;
|
||||
|
||||
use super::widget::Widget;
|
||||
use crate::render_scope;
|
||||
|
||||
pub class Text : Widget {
|
||||
String text;
|
||||
|
||||
pub constructor(str& text)
|
||||
{
|
||||
super = Super::new();
|
||||
self.text = text.to_string();
|
||||
}
|
||||
|
||||
pub virtual void render(&self, render_scope::RenderStack mut& stack) override
|
||||
{
|
||||
render_scope::RenderScope mut& scope = stack.push();
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
pub module widget;
|
||||
|
||||
use crate::units;
|
||||
use crate::render_scope;
|
||||
|
||||
pub class Widget
|
||||
{
|
||||
units::Position x = units::Position::Char(0);
|
||||
units::Position y = units::Position::Char(0);
|
||||
|
||||
units::Size width = units::Size::Full;
|
||||
units::Size height = units::Size::Full;
|
||||
|
||||
pub constructor() {}
|
||||
|
||||
pub virtual void render(&self, render_scope::RenderStack mut& stack) {
|
||||
let _ = stack;
|
||||
}
|
||||
|
||||
pub virtual void update(&self) {}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
void main() {
|
||||
println!("Hello, World!");
|
||||
|
||||
pulse_ui::test();
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Reference in New Issue
Block a user