refactor for server
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
name = "openworm"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
default-run = "client"
|
||||
|
||||
[dependencies]
|
||||
arboard = { version = "3.6.1", features = ["wayland-data-control"] }
|
||||
|
||||
5
src/bin/client.rs
Normal file
5
src/bin/client.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use openworm::client::App;
|
||||
|
||||
fn main() {
|
||||
App::run();
|
||||
}
|
||||
5
src/bin/server.rs
Normal file
5
src/bin/server.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use openworm::server::run_server;
|
||||
|
||||
fn main() {
|
||||
run_server();
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
@@ -1,6 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use app::App;
|
||||
pub use app::App;
|
||||
use arboard::Clipboard;
|
||||
use input::Input;
|
||||
use render::Renderer;
|
||||
@@ -11,10 +11,6 @@ mod app;
|
||||
mod input;
|
||||
mod render;
|
||||
|
||||
pub fn main() {
|
||||
App::run();
|
||||
}
|
||||
|
||||
pub struct Client {
|
||||
renderer: Renderer,
|
||||
input: Input,
|
||||
2
src/lib.rs
Normal file
2
src/lib.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
pub mod client;
|
||||
pub mod server;
|
||||
3
src/server/mod.rs
Normal file
3
src/server/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub fn run_server() {
|
||||
println!("hello world!")
|
||||
}
|
||||
Reference in New Issue
Block a user