wetware/pkg

Use the Wazero interpreter in architectures that don't support the compiler

mikelsr opened this issue · 2 comments

Good idea. I see two approches (but might be overlooking others):

  1. Add a flag and corresponding environment variable that instructs Wetware to use the WASM interpreter
  2. Use Go build constraints to instruct the compiler which source file to use for the Wazero options based on architecture

Option 1 has the advantage of being simple, but the disadvantage of requiring the configuration to be explicitly set. This might confuse beginners. Option 2 is a bit more verbose, but has the advantage of being transparent to the user. I think I prefer 2, personally.

NVM, I saw this before #164. I like your approach better! 👍