Featured

Waydroid on Ubuntu installation

Ensure you are logged into a Wayland session (which is the default), open your terminal, and let us break this down into actionable, non-intimidating steps. 1. Prepare the Canvas First, we need to ensure your package manager is updated and has the necessary tools to fetch external repositories securely. Bash sudo apt update sudo apt install curl ca-certificates -y 2. Add the Official Repository Next, we introduce the Waydroid repository to your system. This command seamlessly integrates their package list into your local directory. Bash curl -s https://repo.waydro.id | sudo bash 3. Install Waydroid With the repository successfully added, installing the application is merely a matter of a single command. Bash sudo apt install waydroid -y 4. Initialise the Environment This is where the actual Android image is downloaded and configured. You have two distinct paths here, depending on your preference for independence: Vanilla Android (Lean, open-source, and highly recommended): Bash sudo wa...

Install Tokio runtime


  1. Ensure Rust is Installed
    If you haven't installed Rust yet, make sure to do so using rustup:

    winget install -e --id Rustlang.Rustup
    
  2. Create a New Rust Project
    If you're starting fresh, create a new Rust project:

    cargo new my_project
    cd my_project
    
  3. Add Tokio as a Dependency
    Open the Cargo.toml file in your project and add Tokio:

    [dependencies]
    tokio = { version = "1", features = ["full"] }
    

    Alternatively, you can run:

    cargo add tokio --features full
    
  4. Write a Basic Tokio Application
    Now, create a simple async function in main.rs:

    use tokio::time::{sleep, Duration};
    
    #[tokio::main]
    async fn main() {
        println!("Hello, Tokio!");
        sleep(Duration::from_secs(2)).await;
        println!("Done!");
    }
    
  5. Build and Run
    Compile and execute your program:

    cargo run

Comments