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

add support for specifying html #35

Open
rukai opened this issue Jun 5, 2023 · 1 comment
Open

add support for specifying html #35

rukai opened this issue Jun 5, 2023 · 1 comment

Comments

@rukai
Copy link
Owner

rukai commented Jun 5, 2023

Winit developers have brought up the desire to provide a full HTML file to cargo-run-wasm.
They want this as they need to provide a "javascript user" focused example, so having to use web_sys to write the html/javascript is no good.
See rust-windowing/winit#2816 and rust-windowing/winit#2852

I think its pretty clear that we need this feature, but I'm not sure yet how it should be designed.

Some competing ideas:

  • turn run_wasm_with_css into a builder struct that can also set the html body
  • Introduce a separate run_wasm_with_html_body function that inserts an html body into the html file
  • Introduce a separate run_wasm_with_html function that takes a full html file and performs some templating on it to insert the wasm script.
@Vrixyz
Copy link

Vrixyz commented Dec 6, 2023

Am I understanding correctly that #40 laid out the foundation so we can hook to RunWasm to add an html parameter capability ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants