#!/bin/bash THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" INSTALL_DIR=/opt/occlum/toolchains/rust mkdir -p ${INSTALL_DIR}/bin rustup target add x86_64-unknown-linux-musl # Generate the wrapper for Cargo # Use -crt-static to dynamically link the application to musl libc library. # Refer to https://github.com/rust-lang/rfcs/blob/master/text/1721-crt-static.md # for more information about crt-static cat > ${INSTALL_DIR}/bin/occlum-cargo < ${INSTALL_DIR}/bin/occlum-rustc <