bolha.us is one of the many independent Mastodon servers you can use to participate in the fediverse.
We're a Brazilian IT Community. We love IT/DevOps/Cloud, but we also love to talk about life, the universe, and more. | Nós somos uma comunidade de TI Brasileira, gostamos de Dev/DevOps/Cloud e mais!

Server stats:

254
active users

#weld

0 posts0 participants0 posts today
Continued thread

Die Fragen basieren auf rechtsextremen Narrativen, à la "staatsfinanzierter Meinungsmache" (konkret z.B. mit Verweis auf "Deep State" Artikel in #WELD), bis zu "NGOs eine Schattenstruktur".

Pure Verschwörungsrhetorik – als ob Greenpeace & Co. heimlich die Republik steuern. 2/

Replied in thread

#weld

Finally been able to produce a tiny executable:

```
$ cat exit.s
section .text
global _start

_start:
mov edi, 42 ; return code 42
mov eax, 60 ; `_exit` syscall
syscall
$ nasm -f elf64 exit.s -o exit.o
$ cargo run -- --target x86_64-unknown-unknown exit.o -o a.out

$ [go on a x86-64 Linux machine]

$ chmod u+x a.out
$ ./a.out
$ echo $?
42
```

That's a first step! Patches are coming.

Replied in thread

#weld

Finally got time to work on this. Have produced my first ELF executable but it doesn’t run… yet. Learning the hard way! The more I dig, the more I learn, which is the primary goal of this project. Stay tuned!

Replied in thread
#intro I share my process more than products. If you want products, see my websites. Born of a concert pianist and Navy Seal. I pursued jazz sax through childhood, then, as a young man, Architecture & the Arts. This formal education led to early career adventures in feature film production. Have been doing my own multidisciplinary thing since 1994. From age 10, I have trained to understand and express the place where mind and body intersect. #50ten40 #meditation #neuroscience #martialart #mindbody #art #artist #creator #maker #weld #tigweld #migweld #torchweld #metalsmith #fabricate #design #film #filmmaking #iatse44 #union #encaustic #architecture #permaculture #permatecture #instructionaldesign #photography #istillshootfilm #photorealism #darkroom #MediumFormat #RB67 #LargeFormat #mindbody #learning #edutech #fedi22 #foss #floss #opensource #loq #cio #cto #author #writing #scot #clanlamont #kntroduction #MastodonMigration
MCM desk front with metal pulls…
Continued thread

#weld

My biggest difficulty with linkers is… understanding their errors! I know I'm not alone.

That's why `weld` must be exemplary on errors, period.

Please welcome `weld-errors`, github.com/Hywan/weld/compare/.

What's new?

* Any error contains a code, a (formatted) message, and a help message,
* `weld` pretty prints those errors,
* `weld --explain <error_code>` gives detailed diagnostics,
* Automatic awesome documentation.

See the screenshots.

Continued thread

#weld

`weld` now takes a `--target <triple>` argument. `weld` is designed to be cross-platform entirely, hence it's legit to be able to specify a target triple, github.com/Hywan/weld/commit/b.

Based on the provided target triple, `weld` will use a particular linker strategy (e.g Elf, MachO, Coff, Wasm etc.).

$ weld --target x86-64-unknown-linux <input> -o <output> # = Elf

$ weld --target aarch64-apple-darwin <input> -o <output> # = MachO

Cool huh?

GitHubfeat(linker): Use a target triple to decide how to link. · Hywan/weld@b7fde2dExperimental stuff. Don't spend your time here for the moment. - feat(linker): Use a target triple to decide how to link. · Hywan/weld@b7fde2d
Continued thread

#weld

A little improvement on the scheduler to make it more system friendly.

`ThreadPool` no longer takes a ˋpool_sizeˋ but a ˋdesired_pool_sizeˋ. The system might not have all the expected available parallelism resources. Maybe it is busy, maybe it is limited. So now, the pool size is clamped, github.com/Hywan/weld/commit/8. The documentation provides more details.

Hopefully Rust has a standard function for that: `std::thread::available_parallelism`. How neat!

GitHubfeat(scheduler): Clamp `pool_size` based on available parallelism. · Hywan/weld@8590fa4Experimental stuff. Don't spend your time here for the moment. - feat(scheduler): Clamp `pool_size` based on available parallelism. · Hywan/weld@8590fa4
Continued thread

#weld

To be fast, weld needs to link objects concurrently & simultaneously. A few days ago, I’ve implemented a simple `ThreadPool` type, in the new `weld-scheduler` crate, github.com/Hywan/weld/blob/ea7.

It’s able to send `Future`s on various threads where async workers execute them.

It’s done with smol, a light & flexible set of crates to implement custom async runtimes, github.com/smol-rs/smol.

Next step: “Linker Strategy” to link things for real!

Continued thread

#weld

To be able to link many object files, we must be able to read them! Of course, there is `std::fs`, but we want to be fast right? So let's use mmap.

Oh, it's not available everywhere. So let's use a file picker, don't you mind, which will select the best implementation for your platform.

And here is `weld-file`, github.com/Hywan/weld/compare/.

So far, it supports `std::fs` and `mmap`, more is coming

There is a `FileReader` trait, that reads the content async.

#RustLang#file#mmap
Continued thread
Continued thread

#weld

Before leaving the elf64, I wanted to write some tests. Fortunately for me, parsers written with nom are really easy to test, they are just functions!

github.com/Hywan/weld/compare/

When tests are easy to write, it's a pleasure to test everything.

With this test session, I've been able to fix one panic when reading a string in a data segment with an out-of-range offset.