cargo-asm
rust_minifb
cargo-asm | rust_minifb | |
---|---|---|
13 | 8 | |
1,104 | 953 | |
- | - | |
0.0 | 6.4 | |
about 2 years ago | 23 days ago | |
Rust | Rust | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cargo-asm
-
Performance difference between obj.function(...) and function(obj, ...) ?
cargo asm might be useful here (if you can't use godbolt).
-
Is there a simple way to borrow the value of an Option without using a match statement?
They should be inlined in release mode. You'd have to verify by checking the assembly, though, which could be done directly in the Rust playground or with a tool like cargo-asm.
-
Hey Rustaceans! Got a question? Ask here (4/2023)!
You can use cargo asm - not sure if you can integrate it with VSCode, but even from a terminal it's a pretty convenient tool.
-
How does rust optimize this code to increase the performance so drastically?
There's probably a built-in one somewhere, but I suspect it'd be easier just to install https://github.com/gnzlbg/cargo-asm
-
Is there a library to display source with annotations?
I don't know if there's a way to do a side by side comparison but cargo-asm uses the source mapping information from rustc to annotate chunks of assembly with it's respective rust code, though it's an imperfect process.
-
Hey Rustaceans! Got a question? Ask here! (25/2022)!
After that you would need some tools to help figure out how to achieve improvements. That will depend on your system and personal preferences. As the other commenter suggested, perf is a good choice on linux. I personally like to look at the generated assembly, using either cargo asm, godbolt, or just rust playground.
-
New crate announcement cargo-show-asm
Doesn't this already exist? https://github.com/gnzlbg/cargo-asm
- on the fly disassembler for Rust symbols
-
Writing the fastest GBDT libary in Rust
From the flamegraph, we knew which function was taking the majority of the time, which we briefly described above. We started by looking at the assembly code it generated to see if there were any opportunities to make it faster. We did this with cargo-asm.
-
How can I profile this type of slowdown?
You're best bet at the moment is probably using cargo-asm to inspect the function assembly to see when it is performing the correct TCO.
rust_minifb
-
placing pixels
Well, it depends on how you use it; writing to an image buffer isn't much less efficient than writing to any normal buffer (in fact, although displaying your scene to a window efficiently is important, your main bottleneck will be the actual ray tracing loop). You may want to read this article for a practical example of using an ImageBuffer to create and draw a texture with Piston. Other window backends you could use, apart from pixels which was already mentioned in another comment, include minifb and Mini GL, though I haven't personally used them.
-
[Media] Tupper's self-referential formula plotting itself on a framebuffer and more with Rust!
After watching the Numberphile video on this formula, I decided to implement it in Rust for fun. It uses minifb for the window creation + framebuffer.
-
Emulating the Sega Genesis - Part II
Before I could implement the display output, I needed something to draw the images onto. There are quite a few Rust crates available to create a GUI window and update it with 2D graphics. Most of these are of course intended for making games, and also include ways of getting key presses as input, which I'll also need. I looked at Piston, which I've used before on other projects, Macroquad, which also supports web assembly as well as desktop targets, Pixels, which is intended specifically for 2D games, and Minifb, which is also specifically for 2D applications, but is much simpler. I also tried out libretro, which is specifically made for video game emulation, but I found it much more restrictive than the others because of it's narrow focus.
-
Hey Rustaceans! Got an easy question? Ask here (40/2021)!
There's several different approaches you could take, but I'd probably suggest macroquad as the easiest. I've also used minifb for windowing + a drawing library like raqote or tiny-skia.
-
Hello, I want to learn how to make emulators. Where to start and for what architecture to write the first project?
I don't know much about Rust, but I used the C version this library, and I think this is as simple as it gets: Rust MiniFB. Hope this helps
-
inku 0.1.0 – An RGB color backed by a `u32` for simple color manipulation
A very simple color manipulation library backed by a u32. My use-case was for use with minifb which uses a u32 frame buffer. Feedback appreciated.
-
Minimal graphics crate for Rust
If all you need is a pixel/frame buffer I'd suggest either pixels-rs or minifb.
-
Yet another NES emulator in Rust - feedback welcome
In my experience, it really makes no difference what rendering backend you use for something as simple as a NES emulator. The 'pixel_renderer' that i wrote basically does the simplest possible thing i could think of - it takes a pixel buffer in cpu memory, copies it over to the gpu, turns it into a texture and stretches it to cover the entire screen. There seem to be many crates out there that do just this - my choice to roll my own was really one out of curiosity and completionism more than anything.
What are some alternatives?
rust - Empowering everyone to build reliable and efficient software.
deku - Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
cargo-show-asm - cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code
macroquad - Cross-platform game engine in Rust.
multitarget-issue
simd-json - Rust port of simdjson
safe_arch - Exposes arch-specific intrinsics as safe function (via cfg).
v4l2loopback - v4l2-loopback device
wide - A crate to help you go wide. By which I mean use SIMD stuff.
pixels - A tiny hardware-accelerated pixel frame buffer. 🦀
stateright - A model checker for implementing distributed systems.
ili9341-rs - A WIP, no_std, generic driver for the ILI9341 (and ILI9340C) TFT LCD display