This commit is contained in:
none 2023-01-11 11:11:04 +01:00
commit 397c8109fd
6 changed files with 1623 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "library"]
path = library
url = https://github.com/002Hub/IPass-library

1572
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

17
Cargo.toml Normal file
View File

@ -0,0 +1,17 @@
[package]
name = "ipass-gui"
version = "0.0.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
winit = "0.27.5"
ip_lib = { path = "library/" }
[profile.release]
opt-level = 'z' # Optimize for size
lto = true # Enable link-time optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations
panic = 'abort' # Abort on panic
# strip = true # Strip symbols from binary; remove pdb

1
library Submodule

@ -0,0 +1 @@
Subproject commit 380ae204378be877fffb7ee7f9167748defc2156

29
src/main.rs Normal file
View File

@ -0,0 +1,29 @@
use winit::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
};
extern crate ip_lib;
fn main() {
let ver = option_env!("CARGO_PKG_VERSION").unwrap_or("x.x.x");
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_title(format!("IPass - {ver}"))
.build(&event_loop).expect("Expected to create window");
event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Wait;
match event {
Event::WindowEvent {
event: WindowEvent::CloseRequested,
window_id,
} if window_id == window.id() => *control_flow = ControlFlow::Exit,
_ => (),
}
});
}