New week, new Rust! What are you folks up to?
Working on loading native ES6 Modules on demand in https://github.com/HiRoFa/quickjs_es_runtime
In order to make that easy to use i gues i'll be learning about procedural macro's in rust ![]()
I submitted a PR to rust-lang/hashbrown adding a (nightly-only) method on HashMap for looking up mutable references to several values at once:
pub fn get_each_mut<Q: ?Sized, const N: usize>(
&mut self,
ks: [&Q; N],
) -> [Result<&'_ mut V, UnavailableMutError>; N]
where
K: Borrow<Q>,
Q: Hash + Eq,
I believe this marks the debut of const generics in hashbrown!
I've been working on writing a library that uses the OpenGL renderer I wrote for FlowBetween as a rendering library for glutin. I've found I keep coming across problems that would be easy to solve if I could just render some graphics on screen, but getting that set up has always been an enormous pain in the past. I've called the library flo_draw.
Here's an example of the output:
and the code that produced that (minus the encoded image):
pub fn main() {
with_2d_graphics(|| {
let mascot = decode_drawing(MASCOT.chars()).collect::<Result<Vec<Draw>, _>>().unwrap();
let canvas = create_canvas_window("Flo");
canvas.draw(|gc| {
gc.draw_list(mascot);
});
});
}
Going to publish the first version this week, and move on to v0.3: the other reason for this work is to split things out to make updating FlowBetween easier when extending the capabilities of the canvas (which has implementations there for quite a few graphics backends beyond OpenGL)
