0xPolygonMiden / miden-vm

STARK-based virtual machine
MIT License
618 stars 156 forks source link

CLI `bundle` command: add `debug_mode` and `kernel` flags #1447

Open plafer opened 1 month ago

plafer commented 1 month ago

Context: https://github.com/0xPolygonMiden/miden-vm/pull/1445#discussion_r1713748940 and https://github.com/0xPolygonMiden/miden-vm/pull/1445#discussion_r1713778654

Currently, the bundle CLI command

  1. creates a Library from a directory, and
  2. automatically includes debug symbols.

It would be great if both were configurable: a --kernel flag would create a KernelLibrary instead of a Library, and a --debug flag would specify to include debug symbols (otherwise they wouldn't be).

bitwalker commented 1 month ago

I'd suggest making --debug the default, and require --debug=false or --no-debug (or something to that effect) to disable that default. Just like cargo/rustc do debug builds by default, and require specifically requesting release builds. We should probably encourage building with debug information, because without it, programs are exceedingly difficult to troubleshoot when something goes wrong in a procedure without that information.