Comments (6)
I also saw that there was a link to some examples in the "Version 0.1 of Smithay" article released on the official website some time ago, but the link is dead since it doesn't exist anymore. (https://github.com/Smithay/smithay/tree/master/examples).
from smithay.
We recently moved and fused these examples into an example compositor written using smithay: anvil, which is in the directory with the same name in this repo.
The main reason why we chose to not keep around a few examples additionally to it is that, is that given the current smithay scope is much lower-level compared to wlc or wlroots, a "basic minimal example" needs to be already almost a thousand lines of code.
At this point, the difference between this and an actual reference compositor is pretty small, hence our choice to rather focus on anvil. Granted it could have more comments and documentation, and that's absolutely something that is planned at some point, though our bandwidth is pretty limited and this is lower priority than making things actually work.
Thus, if you are interested, don't hesitate to look at anvil and report whatever is unclear and would need more comments. If you even feel like helping us clarify all this, I'd be happy to answer any questions and/or merge PRs improving anvil's docs.
from smithay.
I'm not sure you understand how wlroots actually works if you think that Smithay is lower level than it. As far as I can tell Smithay's design is quite similar to wlroots. Honestly until now I thought your approach was reading the wlroots code and making something similar in Rust. Our examples are things like standalone demos of the backends, libinput, output transforms, etc, something I think Smithay would benefit from having as well. Unless you can't actually use any of those features of Smithay alone?
from smithay.
from smithay.
What I mean is that we don't have anything close to
wlr_backend_autocreate
For what it's worth, wlr_backend_autocreate
basically just picks the Wayland backend if WAYLAND_DISPLAY is set, or the X11 backend if DISPLAY is set, or the DRM+libinput backends if not. Such a function in Smithay would be trivial to add.
As for the renderer abstraction, fair enough. Without something like that, making smaller examples might be too annoying to be worth it.
from smithay.
Well, our current status with the "DRM+libinput" backend is that it's still pretty bare-bones, and notably it still requires a fair amount of boilerplate to handle udev correctly. With time we'll get somewhere regarding that, I guess.
So... as a first step, I could try to throw a few winit-based examples, that could only be run as an x11 or wayland client. I still only have that much temporal bandwidth, though.
But yeah, our general design principle is to first integrate as minimal as possible abstractions, and then build new abstractions on top of that. And I feel that we're still too low on backend abstractions to meaningfully be able to present "small examples". But with more time and work, we aim to be able to integrate some of anvil code as proper generic abstractions into smithay, hopefully this would open the door to more meaningful minimal examples.
from smithay.
Related Issues (20)
- Possible typo in the documentation of the struct KeyboardHandle
- 10-bit color support drastically reduced performance HOT 6
- Build errors on Android HOT 4
- Configure clippy::disallowed_macros
- min and max size still in `XdgToplevelSurfaceRoleAttributes`
- Positioning of input-method popups based on `set_point` doesn't seem to be correct HOT 4
- Consider releasing a new version HOT 5
- QueryDmaBufModifiersEXT error on Nvidia driver HOT 1
- wl_data_source.dnd_drop_performed is sent even if a client binds wl_data_device_manager version <3
- dma-buf and dumb buffers doc link broken HOT 1
- `glBlitFramebuffer` fails if default framebuffer doesn't use `STENCIL_INDEX8` HOT 2
- Explicitely set the unsafe parts in unsafe functions.
- Consider using memmap2 for shm pools HOT 1
- Replacing `backend::egl` with glutin
- Document what types are available where in SurfaceData HOT 1
- Support VK_KHR_dedicated_allocation in Vulkan allocator HOT 1
- RFC: Replace user data maps with ECS
- Use robust contexts
- Need a mechanism to track when re-arranging of the surfaces is needed in LayerMap HOT 1
- `wl_data_offer.destroy` is called on a invalid object when using wayland-rs causing a crashing in some software like firefox
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smithay.