mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 12:28:12 +08:00
Restructure GPU compilation execution pipeline (#903)
* Restructure gpu compilation execution pipeline * Add compilation server/client infrastructure * Add wgpu executor
This commit is contained in:
committed by
Keavon Chambers
parent
5a4ef40d24
commit
a492e7a4bb
@@ -21,6 +21,7 @@ tauri = { version = "1.2", features = ["api-all", "devtools", "linux-protocol-he
|
||||
axum = "0.6.1"
|
||||
graphite-editor = { version = "0.0.0", path = "../../editor" }
|
||||
chrono = "^0.4.23"
|
||||
tokio = {version ="1", features = ["full"] }
|
||||
ron = "0.8"
|
||||
|
||||
log = "0.4"
|
||||
|
||||
@@ -32,7 +32,8 @@ async fn respond_to(id: Path<String>) -> impl IntoResponse {
|
||||
builder.body(StreamBody::new(stream)).unwrap()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
println!("Starting server...");
|
||||
|
||||
let colors = ColoredLevelConfig::new().debug(Color::Magenta).info(Color::Green).error(Color::Red);
|
||||
|
||||
@@ -12,6 +12,7 @@ license = "Apache-2.0"
|
||||
|
||||
[features]
|
||||
tauri = ["ron"]
|
||||
gpu = ["editor/gpu"]
|
||||
default = []
|
||||
|
||||
[lib]
|
||||
|
||||
@@ -161,14 +161,14 @@ impl JsEditorHandle {
|
||||
#[wasm_bindgen(js_name = tauriResponse)]
|
||||
pub fn tauri_response(&self, _message: JsValue) {
|
||||
#[cfg(feature = "tauri")]
|
||||
match ron::from_str::<Vec<FrontendMessage>>(&message.as_string().unwrap()) {
|
||||
match ron::from_str::<Vec<FrontendMessage>>(&_message.as_string().unwrap()) {
|
||||
Ok(response) => {
|
||||
for message in response {
|
||||
self.send_frontend_message_to_js(message);
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
log::error!("tauri response: {:?}\n{:?}", error, message);
|
||||
log::error!("tauri response: {:?}\n{:?}", error, _message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user