Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser support #90

Open
slimsag opened this issue Nov 21, 2021 · 6 comments
Open

Browser support #90

slimsag opened this issue Nov 21, 2021 · 6 comments

Comments

@slimsag
Copy link
Member

slimsag commented Nov 21, 2021

Meta issue related to #21

@slimsag slimsag self-assigned this Nov 21, 2021
@guidorice
Copy link
Contributor

(moved my comment from #18 to here)

@slimsag I think it's promising not just for games but for cross-platform graphics of every kind. 👍🏽

Re: "Browser implementation of gpu.Interface", I am curious if you are planning to use Emscripten to build the Javascript <-> WASM glue code? I think that's the only way, currently, because in browser, only Javascript exposes the WebGPU driver.

Also it seems there is definitely interest in using WebGPU for General Purpose GPU (Compute), across native platforms, in browser, and in WASI as well. Some related links, which might provide some ideas for more bespoke things involving shader pipelines etc

@guidorice
Copy link
Contributor

Relevant proposal over here: ziglang/zig#10836

@iddev5
Copy link
Contributor

iddev5 commented Apr 18, 2022

@guidorice you can use freestanding wasm32 and js glue code to access all js resources in zig, no emscripten needed.

See for examples:

  1. https://github.com/bootradev/cupcake/
  2. https://github.com/masterq32/zero-graphics

@glyh
Copy link

glyh commented May 31, 2023

Hello! May I ask what's the status of Browser support for now?

@slimsag
Copy link
Member Author

slimsag commented Jun 2, 2023

@glyh this is my top priority; before we implement it we need to make sysjs provide bindgen-like capability (#691) which is what I'm working on now.

Once we have that, we should be able to auto-generate browser bindings and then Mach will work seamlessly in the browser.

@slimsag slimsag modified the milestones: Mach 0.2, Mach 0.3 Jul 23, 2023
@slimsag slimsag modified the milestones: Mach 0.4, Mach 0.3 Jul 31, 2023
@mateli
Copy link

mateli commented Aug 13, 2023

As a quick and dirty solution can't we utilize emscripten/binaryen? Perhaps by generating a C file for emscripten to compile?

@slimsag slimsag changed the title gpu: Browser support mach: Browser support Sep 18, 2023
@slimsag slimsag modified the milestones: Mach 0.3, Long term Nov 6, 2023
@slimsag slimsag changed the title mach: Browser support Browser support Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants