Memory Safety in C++ vs Rust vs Zig | by B Shyam Sundar | Jul, 2024 | Medium
https://medium.com/@shyamsundarb/memory-safety-in-c-vs-rust-vs-zig-f78fa903f41e
Добротная статья. В целом, хорошая иллюстрация, зачем вообще #Rust
В мире C++ нужно писать новые компиляторы (или обёртки), чтобы работать с владением
https://medium.com/@shyamsundarb/memory-safety-in-c-vs-rust-vs-zig-f78fa903f41e
Добротная статья. В целом, хорошая иллюстрация, зачем вообще #Rust
В мире C++ нужно писать новые компиляторы (или обёртки), чтобы работать с владением
Medium
Memory Safety in C++ vs Rust vs Zig
A look at C++, Zig and Rust in terms of memory safety
❤1👀1
Scientific Computing in Rust 2024
https://scientificcomputing.rs/
Прямо сейчас идёт классный онлайн-воркшоп по #Rust
Тем кто пропускает (например я), записи можно будет потом посмотреть на канале: https://www.youtube.com/@ScientificComputinginRust
https://scientificcomputing.rs/
Прямо сейчас идёт классный онлайн-воркшоп по #Rust
Тем кто пропускает (например я), записи можно будет потом посмотреть на канале: https://www.youtube.com/@ScientificComputinginRust
scientificcomputing.rs
Scientific Computing in Rust
the Scientific Computing in Rust annual workshop and monthly newsletter.
lvkv/whenfs: A FUSE Filesystem for your Google calendar
https://github.com/lvkv/whenfs
вот это я понимаю, пет проекты у людей
PS. и конечно же на #Rust
https://github.com/lvkv/whenfs
вот это я понимаю, пет проекты у людей
PS. и конечно же на #Rust
🤣4🔥3
https://doc.rust-lang.org/nightly/unstable-book/language-features/postfix-match.html
Интересно, случайно наткнулся на классную штуку: возможность писать
для тех, кто как я, любит разные длинные ФП-шные колбасы из вызовов методов один за одним, может иметь смысл
#Rust #TIL
Интересно, случайно наткнулся на классную штуку: возможность писать
match
в "текучем" стиледля тех, кто как я, любит разные длинные ФП-шные колбасы из вызовов методов один за одним, может иметь смысл
#Rust #TIL
Forwarded from trace!("TheBestTvarynka") (Pavlo Myroniuk)
Both frontend and backend are written in Rust. Sometimes you need to know the host OS in the frontend code.
After some googling, I wrote a small workaround.
The idea is to define a custom
Now I can use the
#rust
#[cfg(target_os = "...")]
will not work because all Rust frontend code is compiled with the wasm32-unknown-unknown
target. So, you'll always get a non-Windows target OS.After some googling, I wrote a small workaround.
// build.rs
fn main() {
println!("cargo::rustc-check-cfg=cfg(windows_is_host_os)");
if cfg!(windows) {
println!("cargo:rustc-cfg=windows_is_host_os");
}
}
The idea is to define a custom
cfg
attribute in the build.rs
. All code in build.rs
is executed after dependencies compilation but before app compilation. So, in the build.rs
we have more information about the host OS than in the frontend code.Now I can use the
windows_is_host_os
in the #[cfg(...)]
attribute:// somewhere in the frontend code
#[cfg(windows_is_host_os)]
{
// Windows
}
#[cfg(not(windows_is_host_os))]
{
// Not Windows
}
#rust
🔥4😁1
Я обычно для быстрых проверок пользуюсь официальной песочницей (онлайн компилятор): https://play.rust-lang.org
Но в нём нет возможности указать зависимости :(
Поэтому был рад, когда нашёл Rust Explorer, который позволяет их указывать, например: https://www.rustexplorer.com/b/q76rqj
#Rust #TIL
Но в нём нет возможности указать зависимости :(
Поэтому был рад, когда нашёл Rust Explorer, который позволяет их указывать, например: https://www.rustexplorer.com/b/q76rqj
#Rust #TIL
play.rust-lang.org
Rust Playground
A browser interface to the Rust compiler to experiment with the language
❤2
Rust Project goals for 2024 | Rust Blog
https://blog.rust-lang.org/2024/08/12/Project-goals.html
Здорово!
Выделил для себя всё связанное с async:
- Скоро будет 2024 Edition: небольшие (но долгожданные изменения) изменения синтаксиса
- Улучшения async (жду не меньше!): упрощение написания async кода
#Rust
❤3👍2🤡1
zlfn/rust-gb: Compile Rust code to GBZ80 (Gameboy Z80)
https://github.com/zlfn/rust-gb
интересно, на #Rust уже можно писать для Gameboy
GitHub
GitHub - zlfn/rust-gb: Compile Rust code to GBZ80 (Gameboy Z80)
Compile Rust code to GBZ80 (Gameboy Z80). Contribute to zlfn/rust-gb development by creating an account on GitHub.
😎4👍1
Forwarded from trace!("TheBestTvarynka") (Pavlo Myroniuk)
Around half a year ago, I started my new side project: Dataans. It already has plenty of good features and I think I'm ready to present it to you.
I'd say that it's not ready and missing a lot of functionality, but I remembered the following quote (Lessons learned in 35 years of making software):
I've been thinking about it for a while and decided to finally publish a first release. Otherwise, it might never happen. I always have something in mind to implement/fix/improve. It is an infinite process 😌
So, let me introduce you: Dataans - a yet another note-taking app. The main idea is to take notes in markdown snippets and group them into spaces. It's like Telegram and Saved messages or personal channels (it is when you have a channel with only one subscriberyou ). I wanted such an app for years and finally wrote some MVP.
➡️ https://tbt.qkation.com/projects/dataans/ This post explains my motivations, wanted and missing features, and why I don't like existing note-taking apps. Alternatively, you can read the project README.md.
#rust #tool #dataans
I'd say that it's not ready and missing a lot of functionality, but I remembered the following quote (Lessons learned in 35 years of making software):
When you deliver work you’re really proud of, you’ve almost certainly done too much and taken too long.
I've been thinking about it for a while and decided to finally publish a first release. Otherwise, it might never happen. I always have something in mind to implement/fix/improve. It is an infinite process 😌
So, let me introduce you: Dataans - a yet another note-taking app. The main idea is to take notes in markdown snippets and group them into spaces. It's like Telegram and Saved messages or personal channels (it is when you have a channel with only one subscriber
#rust #tool #dataans
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - TheBestTvarynka/Dataans: Take notes in the form of markdown snippets grouped into spaces.
Take notes in the form of markdown snippets grouped into spaces. - TheBestTvarynka/Dataans
🔥1
Forwarded from Блог*
#prog #rust #article
"Why is the Rust compiler so slow?"
Чел погрузился в кроличью нору с твиками флагов LLVM, чтобы ускорить сборку в докере сервера для своего сайта.
Спойлер: из всех средств наиболее эффективным оказалось то, что подсказали автору уже после публикации. Именно, замена базового образа с Alpine на Debian (-69% времени сборки).
"Why is the Rust compiler so slow?"
Чел погрузился в кроличью нору с твиками флагов LLVM, чтобы ускорить сборку в докере сервера для своего сайта.
Спойлер: из всех средств наиболее эффективным оказалось то, что подсказали автору уже после публикации. Именно, замена базового образа с Alpine на Debian (-69% времени сборки).
😁11🔥3