Rust

8031 readers
3 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
101
102
103
104
 
 

I've been building a bytecode VM in Rust and recently implemented NaN boxing for value representation. Sharing here for anyone interested.

I needed all VM values (booleans, integers, string pool indices, bytecode references) to fit in 64 bits (stack is Vec).

My implementation encodes 5 distinct types using a 3-bit tag and 32-bit payload, all within a single u64. It also has 15 unused bits, they may be used later for types expansion.

I'm using a 64-bit layout:

  • Bits 63-51: Quiet NaN signature (0x7FFC...)
  • Bits 50-18: 32-bit payload (integers, string pool indices, etc.)
  • Bits 17-3: Unused/ (15 bits)
  • Bits 2-0: 3-bit type tag

So it allows me to have 5 tagged types: TRUE_VAL, FALSE_VAL, STRING_VAL, CALLDATA_VAL, U32_VAL

Developer @tracyspcy@lemmy.ml

105
1
This Week in Rust 633 (this-week-in-rust.org)
submitted 4 months ago by mrbn@lemmy.ca to c/rust@programming.dev
106
 
 

Link to original post by madmo@programming.dev

107
108
 
 

cross-posted from: https://lemmy.ml/post/41182690

Here is my winter holiday project. Current scope and known issues are listed in readme, so thoughts and ideas on them are welcome ^_^

109
 
 
110
111
112
 
 

Stolen from the old place

113
 
 

cross-posted from: https://beehaw.org/post/23996175

Website: https://yazi-rs.github.io/

Changelog: https://github.com/sxyazi/yazi/blob/main/CHANGELOG.md#v251229

They have lot of stuff:

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Fixed for any bug fixes.
  • Improved for performance improvements.

I just list the first 10 added stuff:

[v25.12.29]

Added

  • Remote file management ([#3396])
  • Virtual file system ([#3034], [#3035], [#3094], [#3108], [#3187], [#3203])
  • Shell formatting ([#3232])
  • Multi-entry support for plugin system ([#3154])
  • Zoom in or out of the preview image ([#2864])
  • Improve the UX of the pick and input components ([#2906], [#2935])
  • Show progress of each task in task manager ([#3121], [#3131], [#3134])
  • New fs.copy() and fs.rename() APIs ([#3467])
  • New experimental ya.async() API ([#3422])
  • New overall option to set the overall background color ([#3317])
  • ... and more!
114
 
 

Hey everyone,

Basically the title. I'd like to learn how to make my own drawing program and I'm slightly surprised that I can't seem to find anything about it. No tutorials or discussions about requirements or just general tutorials.

Does anyone have any recommendations on where I could start?

115
 
 
  • New CLI flag allows overriding the markdown flavor for a single run
  • Options: commonmark, gfm (GitHub Flavored Markdown)
  • Useful for testing files against different markdown specifications
116
 
 

This is a small release to support Deku 0.20.0 release. The only incompatibility was an introduced descriptive-errors feature which is explicitly propagated at the moment.

The crate started as support decoding and encoding fixed and variable length unicode strings, but quite soon become more than this.

While there’s some ideas to implement, new ideas and improvements are always welcome.

117
 
 

This Christmas, my wife outdid herself. She knew I loved Rust, so she DIYed me a Ferris. It’s now guarding my desk, judging my unwrap() calls and reminding me to write safer code.

Based on the pattern from here (the instructions are in german)

118
 
 

A new release of Kellnr, the crate registry is out. Kellnr is now a single binary that includes all web resources and config files, making it easier to deploy. As a new feature, web-hooks where added to interact with kellnr from other applications.

119
120
121
1
This Week in Rust 631 (this-week-in-rust.org)
submitted 5 months ago by mrbn@lemmy.ca to c/rust@programming.dev
122
 
 

Hi everyone,

we, the iceoryx community, just released iceoryx2 v0.8, an ultra-low latency inter-process communication middleware in Rust, with C, C++, Python and with this release, C# bindings.

If you are into robotics, embedded real-time systems (especially safety-critical), autonomous vehicles or just want to hack around, iceoryx2 is built with you in mind.

Check out our release announcement for more details: https://ekxide.io/blog/iceoryx2-0.8-release

And the link to the project: https://github.com/eclipse-iceoryx/iceoryx2

123
 
 

cross-posted from: https://programming.dev/post/42658798

Mago 1.0.0 - the first stable release of the Mago PHP toolchain

124
125
1
This Week in Rust 630 (this-week-in-rust.org)
submitted 5 months ago by mrbn@lemmy.ca to c/rust@programming.dev
view more: ‹ prev next ›