New week, new Rust! What are you folks up to?
I've been looking for an excuse to get back into Rust and so decided to try writing a little toy Syncthing implementation. We'll see how far I get before I run out of steam or hit a wall but for the moment it's fun, and a great way to play with things I don't usually get to do (network programming, peer-to-peer protocol, async stuff, etc...).
The code (don't expect too much...) is here: GitHub - abusch/st-rust: Toy implementation of Syncthing in Rust
I also have to say, the last time I tried to get into Tokio/async stuff was maybe 3 years ago, back when you had to write your own Futures by hand and Tokio was split between futures 0.1 and 0.3... Things have come such a long way! The async/await syntax makes things a breeze and the Tokio documentation with the mini-redis example is awesome Big kudos to everyone who worked on getting things to the current state!
I put lots of work into RampMaker last week. Cleaning up, improving testing infrastructure, improving the accuracy of the trapezoidal motion profile, and making the API more flexible. Still more to do this week, as the trapezoidal motion profile doesn't quite support the more flexible API yet.
Once I'm done here, I can use the new capabilities to implement a high-level interface in Step/Dir.
I made a database backed FUSE File system in Rust.
Any feedback or collaboration is welcome...
Working on adding text support to flo_draw - well, really flo_canvas. I've built an initial version that uses allsorts and font-kit to render text at a particular location. 'Hello, world' is working already:
let lato = Arc::new(Vec::from(include_bytes!("Lato-Regular.ttf").clone())); gc.define_font_data(FontId(1), FontData::Ttf(Arc::clone(&lato))); gc.set_font_size(FontId(1), 100.0); gc.fill_color(Color::Rgba(0.0, 0.0, 0.6, 1.0)); gc.draw_text(FontId(1), "Hello, World".to_string(), 50.0, 500.0);
The way this is working is pretty interesting (well, I think it's pretty interesting). The tessellator has no idea how to deal with text instructions, so I'm using font-kit to generate outlines that it can deal with. Its input is a stream of drawing instructions, so I've written a routine to convert a stream of any drawing instruction to one with any text instruction replaced with simple path operations, which means any renderer that doesn't know how to handle text can be turned into one that does just by calling
stream_outline_fonts(). I think this will also be useful for things like generating SVG files too, as it removes the need to write the fonts to the file, and probably also for FlowBetween which will need to be able to convert text to outlines.
Still to do on this: loading system fonts, maybe some kind of text formatting system. A way to turn on hinting might be useful too. For rendering large amounts of text, some sort of caching system that puts glyphs into sprites so the tessellator is only invoked once would be a good addition but might be a bit too complicated for v0.3.
Writing clib 0.2.0 to support more targets/OSes.
Been working on Pizarra, a simple drawing application written in Rust using gtk for the interface. It features infinite¹ canvas and zoom. I use it for live presentations and teaching (because I love to make diagrams by hand). I wrote it because I got a wacom tablet and needed a simple way to take advantage to it. No need for a professional drawing program.
I have to admit, writing this project has lead to a lot of learning about the language.
- Infinite within the limits of floating point arithmetic
@categulario That's really cool. I'll have to try it out.
Thanks! :') Pizarra has like one user that is not me. Please don't hesitate to reach out to suggest features or in case you need help making it run (it should be fairly easy on a linux machine).
I'm working on getting my scientific apps converted from C++ to Rust.
First up is my Fourier transform app. Rust has an FFT crate but its based on obsolete "Numerical Recipes in C code"
I found my first conversion a lengthy process due to my being a Rust newbie, but I believe Rust is much better than C++ even though the Rust learning code is steep.
Next up is to get my 2-D Cartesian plotting graphics to work based on using Rust version of lodepng. God bless this Forum..its a great help to newbies