stm32f4xx-hal
tokio-tungstenite
stm32f4xx-hal | tokio-tungstenite | |
---|---|---|
11 | 15 | |
506 | 1,621 | |
2.8% | 2.6% | |
8.4 | 7.3 | |
7 days ago | 4 months ago | |
Rust | Rust | |
BSD Zero Clause License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
stm32f4xx-hal
- Rust newcomers are 70x less likely to create vulnerabilities than C++ newcomers [pdf]
-
1.5st project: Rusty Stopwatch
I would personally use the abstractions provided by the stm32f4xx-hal crate more. See https://github.com/stm32-rs/stm32f4xx-hal/tree/master/examples/ for examples.
-
[Media] To get familiar with embedded Rust, I wrote a Tetris clone! It's running on an STM32. I repurposed a board I designed for another project
For this project, the audio ended up being the biggest challenge. I spent a few days on-and-off working on it because it would stop working as I modified the PWM frequency. I was eventually able to track it down to a bug in the HAL and opened a PR accordingly: https://github.com/stm32-rs/stm32f4xx-hal/pull/555
-
Hey Rustaceans! Got a question? Ask here! (30/2022)!
For my specific issue, I'm using the stm32f4xx-hal library to control a bunch of RGB leds, each with a pwm output. Since I have to get pins and timers where I can find them, each component of the led is made by something like
-
STM32F4 Embedded Rust at the HAL: PWM Buzzer
At the time of writing this post, I noticed that if going with option 1 stated earlier that returns a PWMChannel can prove to be quite problematic. In navigating the documentation, the PWMChannel implementations do not include methods that allow to get and set the period of the peripheral. There is an issue that I submitted here for that.
-
blink sketch for stm32f411?
Maybe check out this example from the stm324xx-hal repo?
- How to setup CLion for programming AVR microcontrollers?
-
can u reccommend a microcontroller for my protorypes needs?
Here is an example for stm32f407 (trivial to change to stm32f411) that gets random numbers from the rng peripheral and displays them on an ssd1306 display: https://github.com/stm32-rs/stm32f4xx-hal/blob/master/examples/rng-display.rs although this uses Rust, which you may or may not like. Arduino will have you covered as well, obviously.
- Huge binary size when using usbd_device SerialPort on stm32
-
Learn a new language after C. Rust or C++?
A major benefit of Rust in embedded is how easy it is to use libraries. This example implements USB serial communication on an STM32 in under 80 lines. You add some libs and if it compiles it works.
tokio-tungstenite
-
How to know when can I send a message via a websocket with tokio tungstenite?
I can't help you debug your code if you do not provide it. Have you looked at the example client?
-
Yet another Web-Socket implementation in rust.
It passed all test of the autobahn testsuite And web-socket-benchmark show about 3x faster then tokio-tungstenite
-
Hey Rustaceans! Got a question? Ask here (7/2023)!
There are example files in the tokio-tungstenite crate called `autobahn-client.rs` and `autobahn-server.rs`. Why are they called autobahn? I googled and can't understand what autobahn is all about. Is it a websocket pattern? Or some protocol?
-
Hey Rustaceans! Got a question? Ask here (5/2023)!
I'm using another crate that requires tls, specifically tokio-tungstenite, I'll try your suggestions later today once I get home
-
Hey Rustaceans! Got a question? Ask here (3/2023)!
Tokio-tungstenite - It looks like in this example, it's spamming the task thread with wakeup calls from all of the active connections. This design choice makes me doubt that this was well written in general.
-
Should i use ws-rs?
tokio-tungstenite is the more popular library. In frameworks, offhand Axum supports websockets (docs, example)
-
How would you refactor this code to use std's Mutex instead of Tokio's mutex
If you only have one task sending data to the sink, you probably don't need forward, as you can just write to the sink directly (you might not even need to split the stream in the first place, but i'm not sure about that). But often you want to write to the sink from different tasks (e.g. this example takes messages sent from one websocket connection, and broadcasts it onto every other connected websocket, so the sink for each websocket needs to be accessed by every other websocket handler task), and you can't do that with only the sink as you can't clone it. Either need to wrap it into a Mutex and clone that around the different tasks (and lock it every time you need to write to it, like OP did originally) or you can use forward to map the rx (receiver) of a channel to the sink, and clone the tx (sender) part of the channel for each task that wants to write to the sink. That way, you only have one task that is accessing the sink directly, so no issues with synchronization.
-
Hey Rustaceans! Got a question? Ask here! (30/2022)!
Has anyone worked with websockets before? Particularly with the tokio-tungstenite crate? I'm getting a Protocol(ResetWithoutClosingHandshake) error in my request. I send in some text, and i'm supposed to receive an audio file back.
-
What's the best production-grade websocket library in Rust?
tokio-tungstenite
-
help using async websocket using tokio-tungstenite
i based my code mostly on the client example from the tokio-tungstenite project: https://github.com/snapview/tokio-tungstenite/blob/master/examples/client.rs
What are some alternatives?
stm32-rs - Embedded Rust device crates for STM32 microcontrollers
async-tungstenite - Async binding for Tungstenite, the Lightweight stream-based WebSocket implementation
meta-raspberrypi - Yocto/OE BSP layer for the Raspberry Pi boards
Warp - Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
embassy - Modern embedded framework, using Rust and async.
reqwest - An easy and powerful Rust HTTP Client
cargo-binutils - Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain
axum - Ergonomic and modular web framework built with Tokio, Tower, and Hyper
bare-metal-stopwatch-rust - Bare-metal interrupt-driven stopwatch on STM32F439ZI, written in Rust
tangle - Radically simple multiplayer / networked WebAssembly
hubris - A lightweight, memory-protected, message-passing kernel for deeply embedded systems.
warp - A super-easy, composable, web server framework for warp speeds.