Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

204 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bottles-core

The application core for managing Bottles Next Wine and Proton environments.

bottles-core discovers and installs managed components, persists bottles, executes Windows programs through WineBridge, and provides checkpointed prefix mutation and snapshots through FVS.

Source | Issue tracker

Overview

The crate is centered around four types:

  • Bottles owns the download service and provides the addon and bottle managers.
  • Addons publishes live collections of runners and installable addons. Item values are snapshots; query the manager again after a publication.
  • BottleManager interns bottles by UUID. A Bottle is a shared handle whose current immutable BottleState can be read or watched.
  • Operation<T> represents long-running work with progress and cooperative cancellation.

Operations are lazy. Await them, call cancel().await, or spawn them and explicitly detach the task; dropping an operation abandons it.

Example

Add bottles-core and an async runtime to your application:

[dependencies]
bottles-core = "0.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

Open the library, inspect the current bottles, and stop its download service:

use bottles_core::{Bottles, Config};

#[tokio::main]
async fn main() -> Result<(), bottles_core::error::Error> {
    let bottles = Bottles::open(Config::default()).await?;

    for bottle in bottles.bottles().list() {
        let state = bottle.state()?;
        println!("{}\t{}", state.id(), state.name());
    }

    bottles.close().await
}

Getting help

Build the API documentation locally with cargo doc -p bottles-core --open. Report bugs through the issue tracker.

License

Licensed under the GNU General Public License, version 3.

About

The source code of the Next core library.

Resources

Stars

13 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages