Skip to content

Unable to build for wasm32-unknown-emscripten #24

@DSchroer

Description

@DSchroer

From a empty project and adding tracing-wasm as a dependency. Building with cargo build --target wasm32-unknown-emscripten fails due to the following error:

= note: error: undefined symbol: main/__main_argc_argv (referenced by top-level compiled C/C++ code)
          warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols
          warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
          warning: _main may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
          warning: To build in STANDALONE_WASM mode without a main(), use emcc --no-entry
          Error: Aborting compilation due to previous errors
          emcc: error: '/usr/bin/node /usr/lib/emscripten/src/compiler.js /tmp/tmpxlhf40bq.json' failed (returned 1)
          

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions