bytecodealliance / javy

JS to WebAssembly toolchain
Apache License 2.0
2.3k stars 111 forks source link

Introduce the `build` command in the CLI #721

Closed saulecabrera closed 3 months ago

saulecabrera commented 3 months ago

This commit introduces a build command in the CLI, which behaves exactly as the compile command and introduces a deprecation warning to the existing compile command.

Additionally, as a preparation for the CLI redesign discussed in https://github.com/bytecodealliance/javy/issues/702, this commit introduces a small refactoring of the code generation process, by:

The main motivation for the refactoring is to:

NB: Given that the compile and build command are exactly the same, and that this change is purely mechanical; this change doesn't introduce integration tests for the build command. The plan is to introduce tests once other options are added to the build command as part of the CLI redesign. Alternatively, tests can be added, however, it would require either duplicating the entire test suite or adding testing infrastructure to minimize duplication, which will increase the size of the change.

Checklist