Comments (5)
I'm intentionally not targetting ESP-IDF. Here was the rationale:
- Want to minimize pressure on the allocator. Whenever possible we want to use crates that don't even need
alloc
. We still ship a global allocator just in case but honestly I may remove even that - we haven't had a use for it yet. I could write my code asno_std
and run it onstd
, but its a lot more likely that my dependencies will be using the allocator or more expensive OS primitives like threading etc. - I want to be able to understand the entire tech stack of the firmware. This is because when there are bugs in dependencies (and there frequently are!) I want to be able to submit a PR to those dependencies to fix them. So far I've found that I have been able to fix issues in dependencies without too much effort because those dependencies have been written in rust, and are small and modular. ESP-IDF is neither of these things. I tried for months initially to port the official SlimeVR firmware to arduino running on top of esp-idf, and it was simply impossible due to the complexity of the tech stack - I never knew if the problem was in the hardware, my code, esp-idf, the configuration of esp-idf, arduino core, arduino library, or platformio. Now arduino on the esp32c3 is much more stable/usable, but it really drew attention to the importance of being able to fix bugs in the underlying tech stack.
- I want first-class support for rust build tools. This means a
cargo build
should work without requiring cmake, python, esp-idf installation, etc. I want to be able to use tools likecargo espflash
andcargo embed
also, when available. - I want to not only target the esp32, but really any device with
embedded-hal
and thatembassy-executor
runs on (which is pretty much everything). I recently merged some PRs that added initial nrf52840 support, and this was painless due to the careful isolation of platform-specific code that has been a design goal from the start. - I wanted the learning experience of
no_std
and avoidingalloc
when possible, to improve my familiarity with bare metal code.
Hopefully this explains why I am looking to build on no_std
and embassy instead of an RTOS, or std
rust on top of an RTOS. Let me know if you have any questions! Do note however that these design goals are unlikely to change.
from slimevr-rust.
Yeah but it wont help for other architectures :/, any ideas?
from slimevr-rust.
@ImUrX Indeed this will trap us into the Espressif ecosystem. What I would suggest is to put portable code into a core crate and so we can still use other kernels if we can flock to a better ecosystem
from slimevr-rust.
@TheButlah Ah I see...I used to think that you are doubting that Espressif can provide a good ground for future either as they are based in China and US sanction can come in their way but seems like I guessed it all wrong...And the truth instead, you take this as a learning opportunity and for portability sake rather than taking it pragmatic (and maybe dramatic too).
from slimevr-rust.
doubting that Espressif can provide a good ground for future
Quite to the contrary - this codebase heavily relies upon the incredible work done by both official espressif employees and other members of the community from esp-rs. The espressif team has done a lot to make rust work well on their chips, and are extremely responsive to the community, as well as PRs that I submit to their crates.
Anyway, I'm going to mark this issue as closed, but feel free to ask any further clarifying questions.
from slimevr-rust.
Related Issues (20)
- [Firmware] Fix CI not providing correct paths for clippy warnings HOT 2
- [Firmware] Implement basic bmi160 support HOT 2
- [Firmware] Tracker should initiate udp broadcast in handshake HOT 1
- [Firmware] Design a basic ble protocol + payload
- [Firmware] ESP32 can't compile because of atomics HOT 4
- [Firmware] Support LSM6DS3
- [Firmware] Support auto detection of I2C address
- [Overlay] Use standing space HOT 4
- [Overlay] CLI arg to suppress terminal window HOT 2
- [Overlay] Rotate logfile instead of erasing every time
- [Firmware] Use embassy_net in esp wifi HOT 1
- [Firmware] Add timestamps to UnfusedData HOT 1
- [Firmware] BMI160: Read all fifo data in one go without dropping anything
- [Firmware] BMI160 Tracking issue
- [Overlay] Dragging Calibration of body proportion. HOT 1
- [Firmware] Improve isolation of platform-specific code in wifi task HOT 1
- [Firmware] Implement nrf52840 usb serial logger as a defmt logger HOT 2
- [Firmware] Implement `mcu-nrf52840` such that things compile.
- [Firmware] implement UART logging via `defmt_bbq` - mainly for nrf52
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 slimevr-rust.