Comments (11)
Thanks, using cargo to create a Rust project worked.
Sorry, I'm a beginner in Rust, today I started learning the basics to get started.
from std-training.
This works. But if I also want to run in a devcontainer I need to create a separate one for each sub-directory (e.g. intro).
What do you mean? You can open the devcontainer in the espressif-trainings
repo, go to the dessired folder in the Vs Code terminal an run code .
, this will open the folder in VsCode using the same devcontainer
from std-training.
Oh, great - I was not aware of this. Solved!
from std-training.
Al momento de crear un archivo en rust me aparece tambien ese error
Why are you truing to create a rust file? Mind-expanding on which project of the training are you trying to use?
No se porque me aparece esto pero corro el archivo con esta extencion.
I would suggest you use the usual cargo commands, at least, until you get it working.
And, please, let's try to keep the issue in English, so everyone can benefit from our conversation.
from std-training.
Do you mind sharing instructions on how to reproduce this? I was able to use the container with VsCode devcontainer and I also get RA working:
from std-training.
- MacOS Ventura 13.1
- VSC Version: 1.77.0 (Universal), Electron: 19.1.11, Chromium: 102.0.5005.196
- Start with "open folder in container"
- rebuilding container created
esp
user, now logged in asesp
devcontainer.json
(exactly as on GitHub) gives the following Problems:
Property settings is not allowed. [Ln 9, Col 2]
Use 'customizations/vscode/extensions' instead
Property extensions is not allowed.
Use 'customizations/vscode/extensions' instead
- rust-analyzer v0.3.1451
- opening a .rs file (e.g.
hardware-check/src/main.rs
) results in rust-analyzer error:
[ERROR rust_analyzer::config] failed to find any projects in [AbsPathBuf("/workspace")]
[ERROR rust_analyzer::main_loop] FetchWorkspaceError:
rust-analyzer failed to discover workspace
- no run button, errors no flagged, etc.
from std-training.
Repo:
esp@4e5d1c01ec6c:/workspace$ whoami
esp
esp@4e5d1c01ec6c:/workspace$ git remote -v
origin https://github.com/esp-rs/espressif-trainings.git (fetch)
origin https://github.com/esp-rs/espressif-trainings.git (push)
esp@4e5d1c01ec6c:/workspace$ git diff
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 274b0c3..dd68912 100755
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -17,7 +17,7 @@
},
"rust-analyzer.checkOnSave.command": "clippy",
"[rust]": {
- "editor.defaultFormatter": "rust-lang.rust-analyzer",
+ "editor.defaultFormatter": "rust-lang.rust-analyzer"
}
},
"extensions": [
@@ -31,4 +31,4 @@
"remoteUser": "esp",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"workspaceFolder": "/workspace"
-}
+}
\ No newline at end of file
diff --git a/intro/hello-world/src/main.rs b/intro/hello-world/src/main.rs
index ad8a230..71b7807 100644
--- a/intro/hello-world/src/main.rs
+++ b/intro/hello-world/src/main.rs
@@ -12,3 +12,4 @@ fn main() {
sleep(Duration::from_secs(3));
}
}
+
esp@4e5d1c01ec6c:/workspace$
from std-training.
Update: I created an entirely new repo with just the hello-world app, and in this case the analyzer works. No idea why it does not with this cloned repo.
from std-training.
Have you tried opening a project(e.g: intro/hardware-check) instead of the whole repo with VsCode?
from std-training.
from std-training.
Al momento de crear un archivo en rust me aparece tambien ese error [ERROR rust_analyzer::config] failed to find any projects in [AbsPathBuf("//Desktop/Rust_de_0_a_heroe")] No se porque me aparece esto pero corro el archivo con esta extencion.
Por favor ayuda :v
from std-training.
Related Issues (20)
- Use mdBook anchors instead of duplicating code
- Common crates HOT 1
- Async material
- ESP32-C6 and ZigBee examples HOT 4
- The MQTT lesson is not for ESP32? HOT 3
- Running "hardware-check" reports "This script was called from a virtual environment, can not create a virtual environment again" error HOT 2
- Compilation error when building hardware-check example for ESP32 HOT 2
- Building `esp-idf-sys` failed because of uninitialized submodules in esp-idf HOT 3
- error: unrecognized command-line option '--target=riscv32imc_zicsr_zifencei-esp-espidf HOT 2
- How to modify the configuration of SDK,such as the port port port rate HOT 4
- esp32c2 uses 26M crystal oscillator, resulting in delay errors HOT 2
- How to save and pass 'PinDriver' objects HOT 3
- WIFI Example does not compile with the esp_idf_svc crate recommended in the `esp-rs` book HOT 6
- How create multiple asynchronous tasks,task have "loop{}" HOT 3
- 'None' cannot be used for the 'Option' type in 'SpiDeviceDriver::new_single()' HOT 1
- Button interrupt on edge fired repeatedly
- Guide on interoperability with C
- hardware-check: Segment 0 0x3c090020-0x3c09fff8 invalid: bad load address range HOT 5
- RGB LED is not flashing if esp-idf-svc is 0.48.* HOT 3
- Does esp-rs support speech recognition now, or can I use the existing esp-sr?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from std-training.