Posts
4109
Following
281
Followers
429
Software Engineer at Opinsys Oy (starting 03/2025)
Entrepreneur at Siltakatu Solutions Oy

OpenPGP: 3AB05486C7752FE1
@namenlos I have some real world situations mainly with custom JSON targets where without cargo does make sense or at least debugging binary output is easier with less layers. Like when I need to look at DWARF output that a compiler target generates. Obviously I use cargo when I possibly can because it obviously makes sense then ;-) To do Rust with cargo the existing books really have zero value or insight that I would find useful compared to the already pretty great documentation. For low-level hacking a book would be useful.
1
0
0
@kpcyrd OK, I don't really comprehend you but I'll ignore this one, have a nice day :-)
0
0
0
@kpcyrd why i need to read this?
1
0
0

Jarkko Sakkinen

Fix for LARGE event log buffers (bug was reported for 16 MiB region): https://lore.kernel.org/linux-integrity/20241221113318.562138-1-jarkko@kernel.org/T/#u

#linux #kernel #tpm
1
1
1
@AMS So, I think Cargo is great (personally). It is just that in order to use I need to know how it works.
0
0
0
@laho So for low-level programming, or starting with it with any tool, you don't need that much information to begin with it as you don't have complex frameworks to learn. Just how you tell the toolchain where the entry point is and basic stuff like that...

Thus, it is good way to start Rust when you mind is still in virgin state and not been inducted by the cargo cult just yet ;-)
0
0
1
@namenlos when I was young everyone started with Turbo Pascal just enough to generate lookup tables with it and then moved to Turbo Assembler :-) At least you have language constructs and a high-level build language. Don't get what you are complaining about TBH.
1
0
0
@vegard yeah, destination cluster fuck is already scripted...
0
0
1
@f4grx in order to hack one needs to touch the bottom of the ocean first before swimming on the water ;-)
1
0
2
Results 2.4 KB 64-bit ELF. From that most is metadata. Code and data is 337 bytes.
0
0
2

Jarkko Sakkinen

Edited 2 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

Jarkko Sakkinen

Edited 2 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

Jarkko Sakkinen

Edited 2 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
7
6
6
Edited 2 months ago
2
5
1

Jarkko Sakkinen

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
0

Jarkko Sakkinen

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
Show older