Actually not sure if I'll get around to finishing it, but currently a WebGPU-based renderer + scene graph + softsynth fits in about 30k compressed. That's unfortunately a bit big, but we'll see.
If I don't get around to finishing it I'll probably open source the code anyway, just as a fun starting point for others maybe.
Do you think it’s the WebGPU, scene graph, the sound, or the Rust infrastructure that consumes the most space?
Additionally, there's just a lot of code being generated for common containers. It would probably be simpler and smaller to create unsafe containers that just shift pointers to boxed structs around or something, but I haven't gotten around to that yet.
My group: https://www.ctrl-alt-test.fr/productions/
The Pouet search contains a good list of modern 64kB: https://www.pouet.net/toplist.php?type=64k&platform=68&limit...
I don't think he mentions it, and I doubt it's relevant in your Hello World example, but if you have a lot of generic code, it's useful to extract the non-generic parts into a separate non-generic function. For example:
fn foo<T: AsRef<str>>(s: T) -> String {
bar(s.as_ref())
}
fn bar(s: &str) -> String {
// A whole bunch of other stuff
s.to_string()
}