这是indexloc提供的服务,不要输入任何密码
Skip to content

add support for specifying html #35

@rukai

Description

@rukai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions