rustwasm/book

Add a reference section about unwinding and panics

Open

#76 opened on Aug 20, 2018

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Handlebars (215 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (1,832 stars)
PR merge metrics
 (PR metrics pending)

Description

This section should:

  • Explain the current state of unwinding, ie how panic=abort is the only option.
  • Describe what "aborting" means in this context, and how it turns into a JS error, and how Drop implementations are not run.
  • Warn against the dangers of re-entering wasm after it has "aborted" due to inconsistent state from Drop impls not running.
  • Describe how JS can handle "aborts" by creating a new instance of the wasm module.
  • Briefly talk about potential future support for unwinding and link to the proposal.

Contributor guide