Skip to content

Commit

Permalink
Update script to use DEBUG param
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Batschelet <[email protected]>
  • Loading branch information
hexfusion committed Oct 20, 2023
1 parent cb6d57d commit f376c37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions x/programs/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ support. This allows, for example, logging from your program. The compiled
set `WithEnableTestingOnlyMode` for the runtime `Config`.

**NOTE**: Once testing is complete, don't forget to remove all print statements
from your program and recompile without `TESTING_ONLY`.
from your program and recompile without `DEBUG`.

```sh
TESTING_ONLY=1 ./scripts/build.sh
DEBUG=1 ./scripts/build.sh
```

## Storage
Expand Down
6 changes: 3 additions & 3 deletions x/programs/rust/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
#
# $ TESTING_ONLY=1 ./scripts/build.sh .
# $ DEBUG=1 ./scripts/build.sh .
#
# If TESTING_ONLY=1 is passed we compile the program with wasi support for
# If DEBUG=1 is passed we compile the program with wasi support for
# easier debugging.
set -x

target="wasm32-unknown-unknown"
if [ -n "${TESTING_ONLY:-}" ]; then
if [ -n "${DEBUG:-}" ]; then
target="wasm32-wasi"
fi

Expand Down

0 comments on commit f376c37

Please sign in to comment.