My expectation: #Rust will replace most other low level languages for relatively low level use cases. For example platform libraries, kernels, OS components, like services etc.
But I also think that a lot of these projects (especially platform libraries) care about that they won't just be able to be used by other Rust code.
Also my expectation: For a lot of these projects, #Meson will replace #cargo, because it just supports more features, and makes integration into an existing system easier.
I wrote a PDF reader with libcosmic yesterday. While it is very basic and not likely to be ready for the first COSMIC release, it is pure rust, lightweight, GPU accelerated, and highly portable.
@soller Saying an application is "pure Rust" feels to me like saying " I am pure [nationality]"
I don't get how every dependency needs to be 100% written in Rust, otherwise it's not "safe" or something. Different programming languages have different strengths, and Rust isn't the only language you can write "safe" code with.
Just my opinion, and I guess you didn't mean it, but just saying... #Rust#rustlang
Well, it took about 2 weeks longer than I expected (spare time for programming is especially spare at times!) but I finally finished swapping out the graphical backend of my roguelike project with a handrolled one using #wgpu! I'm super excited to be fully in control of my #gamedev destiny!
Wgpu is still pretty difficult, even if it is cleaner than opengl with glow and #glutin. (And up-to-date with its own dependencies, always nice!) #rust
At some point I'll need to refactor all this again if I want to support #wasm. Wasm puts a lot of restrictions on the game I don't like, but the ease of access for players (just try it in the browser!) is an undeniable draw. Maybe I can do a cut-down version, like a demo or shareware for the web? #gamedev#rust
I have tried SQLite, fjall, persy/structsy and redb.
At the end I decided to go with fjall + postcard, which offers the simplest implementation.
However it is probably the newest kid in the block.
For an alpha stage program it is good enough. If I find any problems with consistency or durability it should be easy enough to go back to other options.
So, to get back onto having fun with programming after some bad experiences with #rust people I decided to do a bit of #nim (skull) to get back into the groove again.
One thing that I really like about nim is just how natural and extremely readable it feels. just being allowed to overload stuff, being able to pretty easily just extend stuff small things like indexing a 2D array with a point or that making a contains functino automatically lets me use the "if point in grid" style syntax is really nice.
The one thing from #zig that I kind of miss is that each struct kind of works like a namespace where you can add your functions that works on that type, it kind of makes the code more ordered, because as I end up doing it in my code, it does become a bit more cluttered since everything is on the top level.
Another really nice thing that I like with nim is that it allows me to use the (oca)ml type function calls, so that I can do "seq.add blah" rather than having to do "seq.add(blah)" it's a small thing, but it's really nice.
We work on the content caching service that is part of Fastly's Compute products, all in #rust, (we do work frequently with other teams with C codebases).
at first i thought it would be to reduce vtable size, but vtables are passed by pointer anyway, so it wouldn't make a big difference unless you were constructing a lot of different "dyn" objects.
How can I swap out data to disk, to save memory in #rust?
I'm storing lots of data in a big dict/hashtable. Keys are 64bit ints, values about 20-100 bytes. But I have 600-800M items. I'm currently using a BTreeMap<i64, _>.
Solution must be Rust, open source. Ideally nothing that needs another service running (ie j want something "embedded")
fn main() {<br></br> // Declare a variable binding<br></br> let a_binding;<br></br><br></br> {<br></br> let x = 2;<br></br><br></br> // Initialize the binding<br></br> a_binding = x * x;<br></br> }<br></br><br></br> println!("a binding: {}", a_binding);<br></br><br></br> let another_binding;<br></br><br></br> // Error! Use of uninitialized binding<br></br> println!("another binding: {}", another_binding);<br></br> // FIXME ^ Comment out this line<br></br><br></br> another_binding = 1;<br></br><br></br> println!("another binding: {}", another_binding);<br></br>}<br></br>