New library for GPU-less 2D display in winit, Softbuffer is now ready for use!

As the popularity of the library minifb shows, it is useful to put a 2D buffer/image on a window in a platform-independent way. Minifb's approach to doing window management itself, however, is problematic code duplication. We already have very high quality libraries for this in the Rust ecosystem (such as winit), and minifb's implementation of window management is not ideal. For example, it occasionally segfaults on some platforms and is missing key features such as the ability to set a window icon. While it would be possible to add these features to minifb, it makes more sense to instead use the standard window handling systems.

Softbuffer integrates with the raw-window-handle crate to allow writing to a window in a cross-platform way while using the very high quality dedicated window management libraries that are available in the Rust ecosystem.

Sorry for having two threads in short succession about the same crate. I wanted to formally announce that it is ready to use, however, as not everyone who might want to use it will necessarily be following my other thread.


Neat! There's a number of Bevy users who would love a bevy_softbuffer integration crate to make games on their embedded devices :smiley:

I haven't used bevy before, but I think that you might misunderstand what Softbuffer does. Softbuffer does not do any renderingĀ¹. Its purpose is to abstract away the OS-specific and platform-specific details involved in showing an already-rendered 2D buffer in a window.

1: I am actually working on another crate that does 2D rendering on the CPU, but I do not expect it to be available for some time.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.