New week, new Rust! What are you folks up to?
Glass. This is an experimental frontend development framework I have been working on written entirely in Rust. It has WebAssembly support and is designed to let you write web apps as fast as possible. Here is a greeter in Glass:
:html:
:center:
:p:
Hello, :strong:~return prompt("What is your name?")~/
/
/
/
For more information on it, what it can and cannot do, all of its features, and why I made it, check out the readme, also there are some examples in the repo too. See it here: https://github.com/matrizx/glass
Trying to create a custom Derive macro for spirit. I'm still not really sure it is a good idea in the first place, but let's see what gets out of it API-wise.
https://github.com/vorner/spirit/blob/derive/spirit-derive/examples/derived.rs#L51
Anyway, I'll probably gain some material to write a blog post about even if I decide not to release this thing.
Published proc_macro_roids
, a library to reduce boilerplate when writing proc macros. Going to cut away a lot of similar code in the proc macros for my game.
That's like, meta-meta work to introduce hit-repeat delay during gameplay.
I released v0.22.0 of uom
(Units of measurement -- type-safe zero-cost dimensional analysis) this weekend. The release had a new quantity, momentum
, and some new volume
units from dunmatt and Aehmlo respectively. Also some fixes for incompatibilities between the 2015 and 2018 editions. This week I plan to do more work in my experimental proc macro branch.
I've been adding element re-ordering to FlowBetween. It's actually been working for a while but it lead down a bit of a rabbit hole. Here's how it looks:
Not terribly exciting (the select tool has also acquired an item counter), but it ran me into a bit of a design flaw with the file format. When I originally designed it, I wanted to avoid recording brush information (colour, etc) too often. Partly because it adds to the file size quite substantially for long animations, and partly because it made it simple to avoid resetting the drawing state when rendering a frame - which matters quite a lot when streaming the UI to a browser, as I was doing here. So I put these properties as elements in-line with the other elements. Which means that the brush strokes changed colour when moving them around.
So I've also been changing the format to make these properties attachments of existing elements instead, which requires revamping all of the code that previously assumed the old format. Probably going to spend the rest of the week finishing that up. Maybe also design some proper icons for the ordering buttons as well.
I have published the first version of my mod-player crate. This has grown out of my blog series about writing an Amiga mod player in Rust ( while learning about Rust )
My experience with creating and publishing the crate is at Code Slow: Mod player in Rust - part 6. Creating and publishing the crate
A small part of what I'm working on this week is a refactoring my current project to use a sort of memory layout derivative of multi-dimensional vectors. I don't know what kind of name this pattern already has.
Instead of a vector of vectors, incurring m
allocations and spraying data all over the heap, I'm putting everything in 2 vectors, one for the elements themselves, and the other for recording the (beginning, end)
of ranges within the first vector. This should be a better layout for cache locality given what I'm building.
before:
let v = vec![
vec![1,2,3],
vec![4,5,6],
vec![7]
];
after:
let v = vec![1,2,3,4,5,6,7];
let u = vec![(0,2), (3,5), (6,6)];
Most inner vectors have 1 element and there are potentially many, so this layout should pay off in the end.
I've released version-sync 0.8.1: the crate has been updated to use Rust 2018 syntax — the ability to import macros is great!
Give the crate a try if you want something to warn you about keeping the version numbers in sync with your crate version. This typically applies to examples in your README like:
[dependencies]
foobar = "1.2.3"
I'm working in a portfolio website for a senior designer using actix web with juniper to server the images.
I finally got round to updating my toy programming language Ein to Rust 2018 - now that Crafting Interpreters is a little further along, I'm hoping to have a go at writing a simple stack VM for it.
I'm writing a C wrapper for the ChucK audio language runtime so as to bind to Rust more easily. chuck-sys
This project will be used by ruckus, and ruckus will be used by tgtracker.
As someone who learned Basic on the Commodore 64, then a bit of (GFA) Basic, C and 68k assembly on the Atari ST, I can see straight away that your blog series is going to be a fantastic read, and a good resource for a newcomer to Rust (me)!
I'm having a go at implementing a very simplistic arithmetic packer as a learning exercise, but am only about halfway through the Rust book and am struggling to isolate chunks of time to put into it. So far I'm enjoying it, and taking the opportunity to use the proptest
crate to do QuickCheck style randomised tests -- most importantly, that packing and unpacking something should produce the original data.
Thanks for mentioning prop test. In the end I didn’t use it for my regression tests but it is nice to know that is there. I ended up using the crc crate for calculating the checksum for the output for each song.
I share the time chunk issue. The nice thing about Rust is that because the compiler is so demanding, each bit of completed code tends to be better thought out and there are fewer times I need to revisit old code so it is easier to build incrementally.
Please don't post on "what's everyone doing this week" threads after the week passes.