wabt icon indicating copy to clipboard operation
wabt copied to clipboard

Use wasp library in wabt

Open binji opened this issue 5 years ago • 5 comments

For a while I've been working on a new library called wasp: https://github.com/binji/wasp. It has much of the same functionality as wabt, but written from the ground up to be a library rather than a suite of tools.

Wasp is now at the point where I'd like to look at incorporating it into wabt, so that features don't have to be implemented twice. Wasp could also end up being beneficial to binaryen, perhaps using just wasp's text parser.

Here is a high-level list of tasks that are required to start using wasp:

  • [x] Move wasp library from binji/ to webassembly/
  • [ ] Add wasp library as a git submodule
  • [ ] Add a separate build configuration that builds wasp along with wabt
  • [ ] Replace wabt components with the wasp equivalent
    • [ ] binary reader
      • [ ] replace reader, keep the callback-based API
      • [ ] remove the callback API and use wasp visitor instead
    • [ ] binary writer
    • [ ] text reader
    • [ ] text writer
    • [ ] validator
    • [ ] text -> binary conversion
    • [ ] binary -> text conversion
  • [ ] Remove redundant wabt components (nearly everything, aside from tools, decompiler, interpreter, wasm2c stuff)

I'd like to do this as incrementally as possible, and on the main branch. Since a lot of these components depend on wabt's IR, that likely will be the last piece to remove. In the meantime, we can convert between wasp/wabt structures at the boundary.

binji avatar Sep 11 '20 19:09 binji

Yup, a solid plan. Good idea to do it incrementally.

aardappel avatar Sep 14 '20 17:09 aardappel

Hi @binji, I see that there is no recent activity on this issues, do you still plan to use wasp in wabt?

dbezhetskov avatar Jul 22 '21 10:07 dbezhetskov

A related question - do you need help? 😉

penzn avatar Jul 22 '21 17:07 penzn

Sorry, I haven't been working on Wasm for almost a year now. I'm not certain whether this is a reasonable goal anymore, so I'll leave it to folks who have been working on wabt lately.

binji avatar Aug 02 '21 18:08 binji

@binji does wasp support WASI preview 2 component model? https://github.com/WebAssembly/wabt/issues/2376

HarikrishnanBalagopal avatar Jan 30 '24 09:01 HarikrishnanBalagopal