roc-lang / roc

A fast, friendly, functional language.
https://roc-lang.org
Universal Permissive License v1.0
3.86k stars 284 forks source link

Update preprocess host API #6808

Closed lukewilliamboswell closed 7 hours ago

lukewilliamboswell commented 2 weeks ago

Splitting this off from #6696

This PR modifies the API for preprocessing host binaries for surgical linking.

$ roc preprocess-host --help
Runs the surgical linker preprocessor to generate `.rh` and `.rm` files.

Usage: roc preprocess-host [OPTIONS] <host> <platform> <lib>

Arguments:
  <host>      Path to the host executable where the app was linked dynamically
  <platform>  Path to the platform/main.roc file
  <lib>       Path to a stubbed app dynamic library (e.g. roc build --lib app.roc)

Options:
      --verbose  Print detailed information while pre-processing host
  -h, --help     Print help