interpreter-rust/your_program.sh
codecrafters-bot 49754c51e1 init [skip ci]
2024-08-06 14:09:52 +00:00

29 lines
895 B
Bash
Executable File

#!/bin/sh
#
# Use this script to run your program LOCALLY.
#
# Note: Changing this script WILL NOT affect how CodeCrafters runs your program.
#
# Learn more: https://codecrafters.io/program-interface
set -e # Exit early if any commands fail
# Copied from .codecrafters/compile.sh
#
# - Edit this to change how your program compiles locally
# - Edit .codecrafters/compile.sh to change how your program compiles remotely
(
cd "$(dirname "$0")" # Ensure compile steps are run within the repository directory
cargo build \
--quiet \
--release \
--target-dir=/tmp/codecrafters-interpreter-target \
--manifest-path Cargo.toml
)
# Copied from .codecrafters/run.sh
#
# - Edit this to change how your program runs locally
# - Edit .codecrafters/run.sh to change how your program runs remotely
exec /tmp/codecrafters-interpreter-target/release/interpreter-starter-rust "$@"