all: accelerate long-term development #1166
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach#1166
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
I'd personally like to do better about focusing my efforts on higher-level APIs and 'here's what you can actually do using Mach today' use-cases in the future. i.e. I'd like to be able to focus more on our actual Zig code, and want to do better than I did in the v0.3 release.
I've been reflecting a lot on where we are / are not. Part of this is thinking about what types of Mach users exist today:
a. ..and try to use it today for real projects: ~3 people today
b. ..and 'are waiting for it to be ready': probably sponsors (~40 people) is a decent signal
Mach is a pretty small project/community today! That's not super surprising - and we have a good trajectory. Still, I think it shows some of the division we have, and development effort is a bit fractured among those contributing to Mach:
Mach core
Mach core has actually seen less adoption/interest overall the past ~year than I thought it might. There are a few reasons for this:
Even among those that I think would be a perfect fit for Mach core (people using GLFW and WebGPU), I hear of many preferring to 'I'll just wire them up myself' (possibly because of entrypoint differences on mobile/desktop/web), leading to some amount of support questions to projects that do not e.g. improve Mach or Mach core long-term.
Standalone library questions
Standalone libraries are fine and good, I am glad we offer them. However, it's probably something like 90% of people asking questions and needing support are just random Zig beginners asking basic setup questions around:
Most questions aren't about using Mach, or using Mach core even - and it takes a good deal of time to support such users.
Upcoming challenges
I think we've always known the following migrations were coming for us, it was always just a question of 'when', 'how', and 'what exactly will it look like?' - and the progress towards these have been substantial the past year:
Not all of these are in the same state.
None of the above progress is thanks to myself, it's all thanks to temporary and long-term contributors like pdoane, ali, poltixe - people like foxxne trying it on their projects - and others giving advice.
We know these 3 migrations are going to happen at some point, and we know it's not going to be a buttery-smooth 'just upgrade' migration (sysgpu API will be different than WebGPU's, WGSL->Zig will require rewriting your shaders, GLFW -> custom windowing backends will have some major bugs, etc.) It will be painful.
Maintaining both paths is costly
Our dependency tree is not simple today, and that's in part because we increasingly maintain two totally different descriptions of what our graphics API (and in the near future, windowing backends and shading language) is:
Keeping Dawn in a good/solid/up-to-date state a lot of very focused time (I don't think people in general realize how much time I spend keeping Dawn in a nice state for everyone so that eating the Google build system is not necessary.)
With v0.3, we also weren't able to ship with sysgpu enabled even as an option (because we needed some time to sort out optional dependencies for some sysgpu dependencies) - meaning that the folks who really truly embrace where we're going with Mach (those who have embraced sysgpu) haven't been able to build there projects with the v0.3 release. For me, that cuts a bit deep and tells me something is wrong! If someone really embraces where the project is going, they should benefit from latest-and-greatest, not suffer for it.
The decision we face today
As I see it, we have two choices:
Proposal
De-emphasize standalone libraries (minor point)
Today the website homepage emphasizes standalone libraries. Pages like https://machengine.org/pkg/ also have 'dedicated docs pages' with getting-started guides, etc. for them. Additionally, we direct people with any problem using a standalone library to our Discord.
My intention would be to de-emphasize standalone libraries on the website, making them more like 'just a GitHub repository with some code'. The goal would be to still allow standalone library usage, of course, but have it be more 'these are just the packages Mach uses' rather than 'these are a main feature of the Mach project'
Sound vague? It is :) The specifics would need to be sorted out a bit. This is the least important part of this proposal.
Aggressively embrace instability
My proposal is to aggressively embrace instability. This will harm us and be very painful in the short term, but will be better long-term.
sysgpu
As mentioned earlier, sysgpu is not stable. We expect it's API and shading language to change in some major ways. However, once it is usable as the only backend by a real-world project (like foxxne's projects, which we're already very close to) then I think that's sufficient to say we can switch to it wholeheartedly - even if we expect major changes in the future.
Zig shading language
This one is tricky. There is an initial ramp, where getting e.g. a basic triangle shader working is going to be a bit challenging. Ali and Robin are working on it, and I suspect we'll have that in the next few months.
Once that happens, i.e. once we have a basic triangle rendering using it, I think we should aggressively start switching to it. This will probably be a somewhat incremental process, where we start switching code over to it with WGSL still temporarily available as an option - before WGSL is completely removed.
Custom windowing backends
In short, my proposal here is the same as the above: as soon as we have keyboard+mouse input, and a triangle on screen, we should switch over to custom backends. Even if there are some major outstanding issues (resizing not functional, can't set the window title, etc.) - effectively embrace instability here.
Again, this will be painful short-term, but will open some very obvious contribution opportunities to those who might wish to contribute - and I think long-term it will be better for effort to go to these problems rather than the now-recognized-legacy systems we have in place today.
What happens to mach-gpu, mach-gpu-dawn?
I'd like to put development effort I would normally put to these towards sysgpu, etc. instead. That means I would officially deprecate and unsupport these packages, they would quickly fall into a state of unusable decay. I doubt anyone else will have the skillset/knowledge/time to pick up maintenance of these, so I fully expect they will die.
What happens to mach-glfw?
This project would move into my personal GitHub account and no longer be a Mach project. I would add a note to the README saying it is community-maintained.
I think there are enough Zig community members using this package to keep it in a good/functional state, but as Mach would no longer be using it this would be very low on my list of priorities.
Feedback & Timeline
I am preparing for the SYCL workshop, so none of this will be decided on until after May 17th at the soonest. That gives us a few months to discuss the tradeoffs of this proposal.
The current mach-core setup, using Dawn+WGSL+GLFW, will continue being supported at least until then.
I understand some of the changes in here will be controversial, and depending on what kind of Mach user you are - possibly quite frustrating! I hope you're able to read it in good faith.
Progress towards repository reductions:
mach-model3dhas been removed as an official Mach project: https://github.com/hexops/mach/issues/969mach-sysjslives in the main repository https://github.com/hexops/mach/tree/main/src/sysjsmach-editorrepository has been archived; this will come back in a different form later.mach-objc-generatorlives in the main repository https://github.com/hexops/mach/tree/main/src/mach/objc-generatormach-core-starter-projecthas been deprecated in favor of a simpler build API and docs on https://machengine.org/core/getting-started/basisu,mach-basisu-> https://github.com/hexops/mach/issues/965#issuecomment-2143986899mach-glfw has now been moved to 'community maintained' status and now lives at https://github.com/slimsag/mach-glfw and https://github.com/slimsag/glfw
These projects have been deprecated / moved / are no longer maintained by the mach project:
Sad to see no one commented on this issue, I love the plan here!
I just wanted to say thank you on behalf of the ProwlEngine team, your work with DXC is going to save us a lot of time, thank you!
Just read those proposals and I love them!!! Thank you all contributors, i've effectively been the one "who's waiting for it to be ready" and now seeing all of that makes me wondering if I could maybe try to contribute at my level.