mach: Unified entry point and redesigned engine core #257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From https://matrix.to/#/!hPlvgnLQhMkTucKPrh:matrix.org/$_m_5exLov-5Ue5sGq-6_veTZ0k-RVJAZo9Lj5igjeXA?via=matrix.org
This PR implements:
pub fn main
as their entry point but it doesnt work in other environments like wasm (web) and android or require additional configurations, like in iOS. So instead ask the end application to provide a set of functions: init, deinit, update and resize (and more in future) which are used as per platform limitations behind the scenesEngine
struct which would hold the actual engine functionality. It currently has core (window, events etc) and gpu_driver (webgpu structs). The goal is to provide a cross platform abstraction over these interfaces.Additionally:
App
struct was added in root build.zig which acts as the build system SDK, Its point is to set up the complex build process behind the scenes.Options
which were previously being passed to oldApp
on init is now managed though an exported declaration in the app file usingpub const options: mach,Engine.Options = {...};
This PR does not includes:
Progress towards #18