bridge: add in-process node registry and transform updates with logging; import CustomElement; implement Ctrl::Default; add sdxr_node_count() for diagnostics
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
// Rust C-ABI bridge for StardustXR client integration.
|
// Rust C-ABI bridge for StardustXR client integration.
|
||||||
|
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
@@ -11,8 +12,8 @@ use stardust_xr_asteroids::{
|
|||||||
client::ClientState,
|
client::ClientState,
|
||||||
elements::PlaySpace,
|
elements::PlaySpace,
|
||||||
Migrate, Reify,
|
Migrate, Reify,
|
||||||
CustomElement, Element,
|
|
||||||
};
|
};
|
||||||
|
use stardust_xr_asteroids::CustomElement;
|
||||||
use tokio::runtime::Runtime;
|
use tokio::runtime::Runtime;
|
||||||
|
|
||||||
#[derive(Default, serde::Serialize, serde::Deserialize)]
|
#[derive(Default, serde::Serialize, serde::Deserialize)]
|
||||||
@@ -44,11 +45,30 @@ lazy_static::lazy_static! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
struct Node {
|
||||||
|
id: u64,
|
||||||
|
name: String,
|
||||||
|
transform: Mat4,
|
||||||
|
}
|
||||||
|
|
||||||
struct Ctrl {
|
struct Ctrl {
|
||||||
rt: Option<Runtime>,
|
rt: Option<Runtime>,
|
||||||
handle: Option<JoinHandle<()>>, // client running thread
|
handle: Option<JoinHandle<()>>, // client running thread
|
||||||
tx: Option<tokio::sync::mpsc::UnboundedSender<Command>>,
|
tx: Option<tokio::sync::mpsc::UnboundedSender<Command>>,
|
||||||
next_id: u64,
|
next_id: u64,
|
||||||
|
nodes: HashMap<u64, Node>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Ctrl {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
rt: None,
|
||||||
|
handle: None,
|
||||||
|
tx: None,
|
||||||
|
next_id: 1,
|
||||||
|
nodes: HashMap::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
@@ -68,24 +88,40 @@ pub extern "C" fn sdxr_start(app_id: *const std::os::raw::c_char) -> i32 {
|
|||||||
.expect("tokio runtime");
|
.expect("tokio runtime");
|
||||||
let handle = std::thread::spawn(move || {
|
let handle = std::thread::spawn(move || {
|
||||||
let res = rt.block_on(async move {
|
let res = rt.block_on(async move {
|
||||||
// Run the client with our BridgeState
|
// Run the client with our BridgeState (root PlaySpace)
|
||||||
let _state = BridgeState {};
|
let _state = BridgeState {};
|
||||||
|
|
||||||
// Launch a task to apply incoming commands once the client is up
|
// Spawn command processor task
|
||||||
let cmd_task = tokio::spawn(async move {
|
let cmd_task = tokio::spawn(async move {
|
||||||
// This is a placeholder; in a full implementation we would
|
// We cannot mutate CTRL from inside this async task directly, so we
|
||||||
// hold references to created nodes. For now we simply drain.
|
// accumulate changes and apply them via a secondary channel or by
|
||||||
|
// locking CTRL per message. Simplicity first: lock per command.
|
||||||
while let Some(cmd) = rx.recv().await {
|
while let Some(cmd) = rx.recv().await {
|
||||||
match cmd {
|
match cmd {
|
||||||
Command::Create { .. } => {}
|
Command::Create { c_id, name, transform } => {
|
||||||
Command::Update { .. } => {}
|
if let Ok(mut ctrl_locked) = CTRL.lock() {
|
||||||
|
ctrl_locked.nodes.insert(c_id, Node { id: c_id, name: name.clone(), transform });
|
||||||
|
}
|
||||||
|
println!("[bridge] create node id={} name={}", c_id, name);
|
||||||
|
}
|
||||||
|
Command::Update { c_id, transform } => {
|
||||||
|
if let Ok(mut ctrl_locked) = CTRL.lock() {
|
||||||
|
if let Some(n) = ctrl_locked.nodes.get_mut(&c_id) {
|
||||||
|
n.transform = transform;
|
||||||
|
println!("[bridge] update node id={}", c_id);
|
||||||
|
} else {
|
||||||
|
println!("[bridge] update for unknown node id={}", c_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Command::Shutdown => break,
|
Command::Shutdown => break,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ast::client::run::<BridgeState>(&[]).await;
|
ast::client::run::<BridgeState>(&[]).await;
|
||||||
// Do not await cmd_task here; runtime shutdown will cancel it
|
// Runtime shutdown will drop task; we ignore join result intentionally.
|
||||||
|
let _ = cmd_task;
|
||||||
});
|
});
|
||||||
drop(rt);
|
drop(rt);
|
||||||
let _ = res;
|
let _ = res;
|
||||||
@@ -141,3 +177,11 @@ pub extern "C" fn sdxr_update_node(id: u64, mat4: *const f32) -> i32 {
|
|||||||
if let Some(tx) = &ctrl.tx { let _ = tx.send(Command::Update { c_id: id, transform: mat }); }
|
if let Some(tx) = &ctrl.tx { let _ = tx.send(Command::Update { c_id: id, transform: mat }); }
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optional: expose number of nodes for diagnostics
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn sdxr_node_count() -> u64 {
|
||||||
|
if !STARTED.load(Ordering::SeqCst) { return 0; }
|
||||||
|
let ctrl = CTRL.lock().unwrap();
|
||||||
|
ctrl.nodes.len() as u64
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
{"$message_type":"diagnostic","message":"unused import: `Element`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":365,"byte_end":372,"line_start":14,"line_end":14,"column_start":20,"column_end":27,"is_primary":true,"text":[{"text":" CustomElement, Element,","highlight_start":20,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":363,"byte_end":372,"line_start":14,"line_end":14,"column_start":18,"column_end":27,"is_primary":true,"text":[{"text":" CustomElement, Element,","highlight_start":18,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `Element`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:14:20\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m14\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m CustomElement, Element,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
|
{"$message_type":"diagnostic","message":"unused variable: `name`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":1853,"byte_end":1857,"line_start":77,"line_end":77,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let name = unsafe { CStr::from_ptr(app_id) }.to_string_lossy().to_string();","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":1853,"byte_end":1857,"line_start":77,"line_end":77,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let name = unsafe { CStr::from_ptr(app_id) }.to_string_lossy().to_string();","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":"_name","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `name`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:77:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m77\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let name = unsafe { CStr::from_ptr(app_id) }.to_string_lossy().to_stri\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_name`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
|
||||||
{"$message_type":"diagnostic","message":"unused variable: `name`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":1494,"byte_end":1498,"line_start":57,"line_end":57,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let name = unsafe { CStr::from_ptr(app_id) }.to_string_lossy().to_string();","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":1494,"byte_end":1498,"line_start":57,"line_end":57,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let name = unsafe { CStr::from_ptr(app_id) }.to_string_lossy().to_string();","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":"_name","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `name`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:57:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m57\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let name = unsafe { CStr::from_ptr(app_id) }.to_string_lossy().to_stri\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_name`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
|
{"$message_type":"diagnostic","message":"fields `id` and `name` are never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":1210,"byte_end":1214,"line_start":48,"line_end":48,"column_start":8,"column_end":12,"is_primary":false,"text":[{"text":"struct Node {","highlight_start":8,"highlight_end":12}],"label":"fields in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":1221,"byte_end":1223,"line_start":49,"line_end":49,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" id: u64,","highlight_start":5,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":1234,"byte_end":1238,"line_start":50,"line_end":50,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":" name: String,","highlight_start":5,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: fields `id` and `name` are never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:49:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m48\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Node {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m----\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mfields in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m49\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m id: u64,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m50\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m name: String,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||||
{"$message_type":"diagnostic","message":"unused variable: `cmd_task`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":2205,"byte_end":2213,"line_start":75,"line_end":75,"column_start":17,"column_end":25,"is_primary":true,"text":[{"text":" let cmd_task = tokio::spawn(async move {","highlight_start":17,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":2205,"byte_end":2213,"line_start":75,"line_end":75,"column_start":17,"column_end":25,"is_primary":true,"text":[{"text":" let cmd_task = tokio::spawn(async move {","highlight_start":17,"highlight_end":25}],"label":null,"suggested_replacement":"_cmd_task","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `cmd_task`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:75:17\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m75\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let cmd_task = tokio::spawn(async move {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_cmd_task`\u001b[0m\n\n"}
|
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
||||||
{"$message_type":"diagnostic","message":"fields `c_id`, `name`, and `transform` are never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":506,"byte_end":512,"line_start":22,"line_end":22,"column_start":5,"column_end":11,"is_primary":false,"text":[{"text":" Create { c_id: u64, name: String, transform: Mat4 },","highlight_start":5,"highlight_end":11}],"label":"fields in this variant","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":515,"byte_end":519,"line_start":22,"line_end":22,"column_start":14,"column_end":18,"is_primary":true,"text":[{"text":" Create { c_id: u64, name: String, transform: Mat4 },","highlight_start":14,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":526,"byte_end":530,"line_start":22,"line_end":22,"column_start":25,"column_end":29,"is_primary":true,"text":[{"text":" Create { c_id: u64, name: String, transform: Mat4 },","highlight_start":25,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":540,"byte_end":549,"line_start":22,"line_end":22,"column_start":39,"column_end":48,"is_primary":true,"text":[{"text":" Create { c_id: u64, name: String, transform: Mat4 },","highlight_start":39,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: fields `c_id`, `name`, and `transform` are never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:22:14\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m22\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Create { c_id: u64, name: String, transform: Mat4 },\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mfields in this variant\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
|
||||||
{"$message_type":"diagnostic","message":"fields `c_id` and `transform` are never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":563,"byte_end":569,"line_start":23,"line_end":23,"column_start":5,"column_end":11,"is_primary":false,"text":[{"text":" Update { c_id: u64, transform: Mat4 },","highlight_start":5,"highlight_end":11}],"label":"fields in this variant","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":572,"byte_end":576,"line_start":23,"line_end":23,"column_start":14,"column_end":18,"is_primary":true,"text":[{"text":" Update { c_id: u64, transform: Mat4 },","highlight_start":14,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":583,"byte_end":592,"line_start":23,"line_end":23,"column_start":25,"column_end":34,"is_primary":true,"text":[{"text":" Update { c_id: u64, transform: Mat4 },","highlight_start":25,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: fields `c_id` and `transform` are never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:23:14\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m23\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Update { c_id: u64, transform: Mat4 },\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mfields in this variant\u001b[0m\n\n"}
|
|
||||||
{"$message_type":"diagnostic","message":"5 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 5 warnings emitted\u001b[0m\n\n"}
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user