Skip to content

angelG02/sunset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sunset

Rust multi-platform application engine

How to run:

  1. Make sure to have installed cargo and the latest version of rustc;
  2. Create new project with cargo new ;
  3. Get latest version of sunset engine and place it next to your newly created project:

  1. Add Sunset engine to your project's dependencies (in Cargo.toml inside your newly created project):
[dependencies]
sunset = { path = "../sunset" }
  1. Configure your main application and run the sunset state:
use state::State;
use sunset::prelude::*;

fn main() {
    let cli = cli::CLI {
        commands: vec![],
        context: cli::CLIContext,
    };

    // Functions need to be polled somehow, I have used pollster (which sunset re-exports), but tokio or any runtime can be used
    sunset::pollster::block_on(State::insert_app("CLI", Box::new(cli)));
    sunset::pollster::block_on(state::run());
}
  1. To run your app open a terminal in your project's folder and type cargo run

About

Rust multi-platform application engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages