Posts
4940
Following
327
Followers
492
Linux kernel hacker and maintainer etc.

OpenPGP: 3AB05486C7752FE1
Edited 11 months ago

An example of “Hello World” with raw Rust:

#![feature(no_core,lang_items,start)]
#![no_core]
#![no_std]
#![no_main]

#[lang = "sized"]
pub trait Sized {}

#[lang = "copy"]
pub trait Copy {}

#[no_mangle]
#[start]
pub extern fn _start ()
{
    loop {}
}

You can compile it I think with:

rustc +nightly --crate-type bin -C link-arg=-nostartfiles test.rs

In such book you could obviously use core and std but this is as minimal as it can get (almost) ;-)

#rust #rustlang #cargo

2
2
8
Edited 11 months ago

An example of “Hello World” with raw Rust:

#![feature(no_core,lang_items,start)]
#![no_core]
#![no_std]
#![no_main]

#[lang = "sized"]
pub trait Sized {}

#[lang = "copy"]
pub trait Copy {}

#[no_mangle]
#[start]
pub extern fn _start ()
{
    loop {}
}

You can compile it I think with:

rustc +nightly --crate-type bin -C link-arg=-nostartfiles test.rs

In such book you could obviously use core and std but this is as minimal as it can get (almost) ;-)

#rust #rustlang #cargo

2
2
8

vitaut 🤍❤️🤍 🇺🇦

0
2
1
Edited 11 months ago
Where all existing Rust books fall short is that they are not Rust books.

They are books on building software with Cargo framework.

A great "Understanding Rust" book would based only on using rustc for all examples, and in the context of that book e.g. GNU make could be used to orchestrate the builds.

Using Cargo is obviously fine but it is in the way of in-depth understanding of the language.

This also means that I really do not recommend any of the books written about Rust because they are all as useful as the Rust documentation, i.e. not that useful.

#rust #cargo
6
5
6
Edited 11 months ago
2
5
1
1. My calendar for 2025.
2. My security tip for 2025: use pen and paper for what it works. That info does not leak. I still plan and draft with a notebook (having a grid) and pencil.
0
0
0
@mtraven23 @mallory @thcrt If, let's pick a horrible person, JD Vance wrote a good text on engineering, I would buy it, no question, that's IMHO the art of being analytical :-)
0
0
0
@mtraven23 @thcrt @mallory I would have to study that further to make any conclusions but back when I read that write up in early 00's I did not know even who Joel Spolsky was I just agreed with the text :-)

If I was interpreting it on the basis that the author is also authority you would have a point but based on that it could have been written by anyone and I would still agree with the text, I think the content is still valid, right?
1
0
1
Somehow this video from from gwEm two years ago always is a mood lifter, great stuff :---) https://www.youtube.com/watch?v=up4Ci9kzAeE
0
0
1
Just for the record :-) At least I got the game before it expired so maybe some day.
0
0
0
I went through the great circle :-) Out-of-the-box experience of Windows is really bad TBH. I had to use an external wifi stick to get network ongoing, instead of one in the motherboard's chipset.

PS. #NVIDIA sucks.
1
0
1
Edited 11 months ago
Today I'm going to:

1. Install Windows and wipe my Fedora.
2. Install NVIDIA drivers.
3. Redeem the code for "Indiana Jones: The Great Circle" and check that I get it to Steam.
4. Install Fedora and wipe Windows.

Wondering why FSF had a campaign based on lies about TPM chips, and does not have one on NVIDIA being DRM ;-)
1
0
4
Meanwhile in #Finland at my front door...
0
1
8
If you've ever wondered how to debug custom targets outside of cargo environment, here's an example of that:

https://github.com/paritytech/polkavm/issues/208#issuecomment-2544941559

I.e. situation where you just want to check what the compiler emits.

#rust #cargo
0
2
0
Not forgotten and not discontinued:

https://github.com/umlaeute/v4l2loopback/issues/268#issuecomment-2541605102

Just a slow process and busy at work before holidays ;-)

This is pretty typical for OOT drivers really. Bad architecture choices kind of accumulate because no one dares to make any actual changes to what is already there.

Probably would happen to me too if I was doing OOT so not blaming anyone, just saying how it is ;-)

#linux #kernel #video4linux
0
2
3
Pro-Q4! #FabFilter
0
0
0
... and IRC is obviously for the Gods of Internet ;-)
1
0
3
IM's:

1. Signal: great for professional communications.
2. WhatsApp: great for being in touch with your mom.
3. Telegram and AWS Wickr: great for criminal activity and dealing drugs.
1
2
2
I wonder does SDL3 have anything like baseview [1] for writing plugin UI's?

[1] https://github.com/RustAudio/baseview
0
0
0
Show older