Crates.io | ray-debug |
lib.rs | ray-debug |
version | 0.0.4 |
source | src |
created_at | 2023-03-08 13:26:52.032518 |
updated_at | 2023-03-14 11:26:03.895936 |
description | Rust adapter for the Spatie Ray debugging tool (https://spatie.be/products/ray) |
homepage | |
repository | https://github.com/larsmbergvall/ray-debug |
max_upload_size | |
id | 804614 |
size | 31,165 |
A Rust adapter for Spatie's fantastic debugging tool, Ray.
This is a work in progress, so bugs and breaking changes are likely to occur! Also, not all Ray features are yet implemented!
By default, Ray is listening on http://localhost:23517. If you need to use another host or port, you can specify env variables for this:
RAY_HOST=http://localhost
RAY_PORT=23517
Only basic debugging is implemented at the moment, so you can use it like:
use ray_debug::ray;
// ...
fn do_stuff() {
// ...
ray(&some_struct);
// To set color:
ray(&some_struct).unwrap().orange();
}
Your struct needs to implement the trait serde::Serialize
for this to work. You can also call ray()
with strings, integers etc.