Skip to content

Commit

Permalink
Refactor instantiation to be more async-friendly
Browse files Browse the repository at this point in the history
Instantiation right now uses a recursive `instantiate` function since it
was relatively easy to write that way, but this is unfortunately not
factored in a way friendly to the async implementation in bytecodealliance#2434. This
commit refactors the function to instead use an iterative loop and
refactors code in such a way that it should be easy to rebase bytecodealliance#2434 on
top of this change. The main goal is to make the body of `Instance::new`
as small as possible since it needs to be duplicated with
`Instance::new_async`.
  • Loading branch information
alexcrichton committed Jan 21, 2021
1 parent 986b576 commit 0a2768c
Show file tree
Hide file tree
Showing 2 changed files with 365 additions and 264 deletions.
Loading

0 comments on commit 0a2768c

Please sign in to comment.