/ your_program.sh
your_program.sh
 1  #!/bin/sh
 2  #
 3  # Use this script to run your program LOCALLY.
 4  #
 5  # Note: Changing this script WILL NOT affect how CodeCrafters runs your program.
 6  #
 7  # Learn more: https://codecrafters.io/program-interface
 8  
 9  set -e # Exit early if any commands fail
10  
11  # Copied from .codecrafters/compile.sh
12  #
13  # - Edit this to change how your program compiles locally
14  # - Edit .codecrafters/compile.sh to change how your program compiles remotely
15  (
16    cd "$(dirname "$0")" # Ensure compile steps are run within the repository directory
17    cargo build --release --target-dir=/tmp/codecrafters-build-interpreter-rust --manifest-path Cargo.toml
18  )
19  
20  # Copied from .codecrafters/run.sh
21  #
22  # - Edit this to change how your program runs locally
23  # - Edit .codecrafters/run.sh to change how your program runs remotely
24  exec /tmp/codecrafters-build-interpreter-rust/release/codecrafters-interpreter "$@"