[PR #659] [CLOSED] feat: add a rust client interface #1039

Closed
opened 2026-01-05 14:53:53 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/LGUG2Z/komorebi/pull/659
Author: @tardyp
Created: 2/7/2024
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • 104cb34 feat: add a rust client interface

📊 Changes

5 files changed (+158 additions, -0 deletions)

View changed files

📝 Cargo.lock (+2 -0)
📝 komorebi-core/Cargo.toml (+2 -0)
komorebi-core/src/client.rs (+67 -0)
📝 komorebi-core/src/lib.rs (+2 -0)
komorebi-core/src/state.rs (+85 -0)

📄 Description

This allows to create a pure rust client without having to go via CLI

We also make the state data available in the core so that we can deserialize

use komorebi_core::client::SendMessage;
use komorebi_core::SocketMessage;
use komorebi_core::state::State;

fn main() {
    let state: State = SocketMessage::State.send_receive().unwrap();
    println!("{:#?}", state);
}

My eventual goal is to make a topbar with the slint ui framework in pure rust, and make it easier to integrate with the komorebi state.

Probably there is a bit of cleanup to be merged, but I'd like to get your early feedback on wether this would be a goal to publish koromebi-core in crates.io


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/LGUG2Z/komorebi/pull/659 **Author:** [@tardyp](https://github.com/tardyp) **Created:** 2/7/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`104cb34`](https://github.com/LGUG2Z/komorebi/commit/104cb34d3a826deb2a7e6e14fedc849509a7daf9) feat: add a rust client interface ### 📊 Changes **5 files changed** (+158 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+2 -0) 📝 `komorebi-core/Cargo.toml` (+2 -0) ➕ `komorebi-core/src/client.rs` (+67 -0) 📝 `komorebi-core/src/lib.rs` (+2 -0) ➕ `komorebi-core/src/state.rs` (+85 -0) </details> ### 📄 Description This allows to create a pure rust client without having to go via CLI We also make the state data available in the core so that we can deserialize ```rust use komorebi_core::client::SendMessage; use komorebi_core::SocketMessage; use komorebi_core::state::State; fn main() { let state: State = SocketMessage::State.send_receive().unwrap(); println!("{:#?}", state); } ``` My eventual goal is to make a topbar with the slint ui framework in pure rust, and make it easier to integrate with the komorebi state. Probably there is a bit of cleanup to be merged, but I'd like to get your early feedback on wether this would be a goal to publish koromebi-core in crates.io --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-01-05 14:53:53 +01:00
adam closed this issue 2026-01-05 14:53:53 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1039