This is an automated email from the ASF dual-hosted git repository.
mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git
The following commit(s) were added to refs/heads/master by this push:
new aa77055 Polish the ide script and tip doc (#540)
aa77055 is described below
commit aa77055a9c95ecbdddca14fb51725321cb15df90
Author: Hongbo <[email protected]>
AuthorDate: Mon Aug 9 18:07:00 2021 -0400
Polish the ide script and tip doc (#540)
---
docs/development-tips.md | 11 +++++++----
scripts/ide.sh | 2 ++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/docs/development-tips.md b/docs/development-tips.md
index afa2f76..6659b0c 100644
--- a/docs/development-tips.md
+++ b/docs/development-tips.md
@@ -26,10 +26,13 @@ includes `Cargo.toml` which can be copied from our build
system:
`third_party/crates-sgx/config`. Similarly, when developing the app parts, you
can copy the `cmake/tomls/Cargo.sgx_untrusted_lib.toml` file to the root
directory as `Cargo.toml`, and `.cargo/config` and `Cargo.lock` files can be
-found in `third_party/crates-io/` directory. For standalone Rust applications
-such as CLI, no `Cargo.toml` is needed. After the preparation of `Cargo.toml`
in
-root, RLS/rust-analyzer can understand the projects finally. You will see type
-hints and cross references using IDEs with extensions.
+found in `third_party/crates-io/` directory. Besides, please also change the
+last line of `directory = "vendor"` to `directory =
+"third_party/crates-sgx/vendor"` or `directory ="third_party/crates-io/vendor"`
+so the dependencies can be resolved automatically. For standalone Rust
+applications such as CLI, no `Cargo.toml` is needed. After the preparation of
+`Cargo.toml` in root, RLS/rust-analyzer can understand the projects finally.
You
+will see type hints and cross references using IDEs with extensions.
::: tip NOTE
You can also simply use the script `scripts/ide.sh <trusted|untrusted|clean>`
diff --git a/scripts/ide.sh b/scripts/ide.sh
index 7794322..ad0dbe9 100755
--- a/scripts/ide.sh
+++ b/scripts/ide.sh
@@ -55,9 +55,11 @@ main() {
if [ $1 = "trusted" ]; then
clean 2>/dev/null
copy $TRUSTED_TOML $TRUSTED_LOCK $TRUSTED_CONFIG
+ sed -i '/directory = "vendor"/c\directory =
"third_party/crates-sgx/vendor"' ${teaclave_root}/${CONFIG_DEST}
elif [ $1 = "untrusted" ]; then
clean 2>/dev/null
copy $UNTRUSTED_TOML $UNTRUSTED_LOCK $UNTRUSTED_CONFIG
+ sed -i '/directory = "vendor"/c\directory =
"third_party/crates-io/vendor"' ${teaclave_root}/${CONFIG_DEST}
elif [ $1 = "clean" ]; then
clean
else
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]