Developing VS Code Extensions with Rust
Visual Studio Code now supports running WASM binaries through WebAssembly execution engine extensions. This allows developers to compile programs written in Rust to WebAssembly and run them directly in VS Code.
The key technology in this process is the component model
, which standardizes the interaction between WebAssembly components and the host environment through WIT files.
The original article also provides a Rust calculator example, demonstrating how to integrate libraries written in Rust into a VS Code extension and generate Rust and TypeScript bindings.
Original link: https://code.visualstudio.com/blogs/2024/05/08/wasm
Using Multithreading with egui in the Web
The author, while porting a desktop application to the web, used egui for GUI development and replaced threads with WebWorkers for compute-intensive tasks to enhance user experience and performance.
By introducing the gloo-worker
crate and adjusting the relevant Rust code and index.html file, the creation and communication of WebWorkers were achieved.
Original link: https://voelklmichael.github.io/Blog/2024/05/12/egui-wasm-threads.html
bevy_ios_iap: Providing iOS Native StoreKit2 API in Bevy
bevy_ios_iap
provides access to the iOS native StoreKit2 Swift API from within Bevy Apps. It uses Swift-Bridge to automatically generate glue code and transfer data types.
Original link: https://github.com/rustunit/bevy_ios_iap
Building Decision Trees in Rust
Decision trees can handle classification or regression tasks, suitable for categorical or continuous features. The author chose the polars
crate to load and process data, simplifying access to dataset features and iterative filtering. The Gini impurity metric is used to evaluate the most effective split points, and this metric is calculated through data splitting. Ultimately, the category with the highest count is selected for category prediction.
Original link: https://noiseonthenet.space/noise/2024/05/sowing-a-decision-tree
—
From the Daily Report Team BobQ, FBI Xiaobai
Community Learning and Exchange Platform Subscription:
- Rustcc Forum: Supports RSS
- WeChat Official Account: Rust Language Chinese Community