Skip to content

not possible to run examples #1162

@fbucek

Description

@fbucek

Problem
Not possible to run examples .
Missing doc how to run them.

Examples looks they are prepared for both wasm-bindgen and wasm-pack but I think it cannot be mixed together.

wasm-pack needs this and must have main method defined within lib.rs

[lib]
crate-type = ["cdylib", "rlib"]

lib.rs

#[wasm_bindgen(start)]
pub fn run_app() {
    yew::start_app::<Model>();
}

wasm-bindgen needs main.rs and must not have crate-type = ["cdylib", "rlib"] in Cargo.toml

Environment:

  • Yew version [master]
  • Rust version [1.42.0]

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions