What's everyone working on this week (7/2021)?

New week, new Rust! What are you folks up to?

I recently started to learn Rust and I'm working on a couple of projects to help me explore the language.

  • I'm stumbling through a re-write of an OCaml typed-routing library I maintain (GitHub - anuragsoni/routes: typed bidirectional routes for OCaml/ReasonML web applications). This has been an interesting problem to help explore the language syntax, traits, etc. I've hit a blocker where I am not sure how (or if its possible) to flatten the tuples I collect as I chain the different path parameter matchers and forward them to a "handler". At the very least I expect this problem to lead down some interesting corners of the language :slight_smile:

  • With the hope of starting a blog soon I'm using the motivation to work on a static site generator so I can combine that with a project to aid in learning Rust at the same time!

Still working on a high-level interface for Step/Dir. I've got a lot of design work and experimentation done last week, and now I've started adding the required features to RampMaker.

Working on loading native ES6 Modules on demand in GitHub - HiRoFa/quickjs_es_runtime: this is a wrapper library for quickjs written in rust which works with modules, promises, async, await and much more

In order to make that easy to use i gues i'll be learning about procedural macro's in rust :slight_smile:

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]
    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| {

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)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.