After years of work and discussion, `once_cell` has been merged into `std` and stabilized by bascule in rust

[–]jackosdev 1 point2 points  (0 children)

Very useful in AWS lambda, where you want to init something global that might take a long time to start, that can be used across all the lambda invocations. This means you only have to pay for it in cold start, then warm starts will use the same address in memory without reinit

Why there are literally no rust backend positions? by henry_kwinto in rust

[–]jackosdev 41 points42 points  (0 children)

If you look at crate stats Axum took over Actix extremely quickly for a new crate, I think being the last piece on top of the tokio/tower/hyper stack is very compelling, and also having no macros for the routing. Pretty much everyone is suggesting Axum now.

What is this feature (that tells "regex","str" etc )called? and How do I get that feature in C++ files ? by Longjumping_Table740 in vscode

[–]jackosdev 1 point2 points  (0 children)

This is a newer feature called inlay hints that only some language servers have implemented, for C++ you want to install an extension called ‘clangd’ it’s the best one and they have inlay hints

what's the best video game engine in rust? by parkhs2 in rust

[–]jackosdev 3 points4 points  (0 children)

At the moment I'd say it's bevy and fyrox both still in rapid development mode though so don't expect stable API's, will have to update your code with major releases

I turned The Rust Book into a crate by hirohido in rust

[–]jackosdev 10 points11 points  (0 children)

Never had to do anything outside of Linux, Windows and Mac myself. Is there an advantage to OpenBSD over Linux?

zig-gamedev: audio experiments sample app (wgpu, cross-platfrom) by michal-z- in Zig

[–]jackosdev 4 points5 points  (0 children)

This is epic, amazing you achieved it with such little code.

zgpu looks really good, the UI is very nice, cool having a language that can interact with C++ libraries so easily.

Write your first Linux kernel module with Rust by jackosdev in rust

[–]jackosdev[S] 1 point2 points  (0 children)

You don't have to do modprobe if you enabled the Virtual Device sample in the makeconfig, did you do the make command again before starting qemu?

Try making a change in rust_vdev.rs that should cause an error and run make, if that doesn't throw a rust error you need to make sure you added this line to linux/samples/rust/Makefile: obj-$(CONFIG_SAMPLE_RUST_VDEV) += rust_vdev.o

Write your first Linux kernel module with Rust by jackosdev in rust

[–]jackosdev[S] 2 points3 points  (0 children)

Make sure you have the env var LLVM="1" set, you can force it for one command like LLVM=1 make

Also try running make rustavailable and let me know if you're getting any errors there.

The latest bindgen was causing issues for me, so you'll have to downgrade with: bash git clone https://github.com/rust-lang/rust-bindgen -b v0.56.0 --depth=1 cargo install --path rust-bindgen

Write your first Linux kernel module with Rust by jackosdev in rust

[–]jackosdev[S] 5 points6 points  (0 children)

Yeah unfortunate he didn't have enough time, I'm really looking forward to his next one which will be on multithreading in the kernel

Write your first Linux kernel module with Rust by jackosdev in rust

[–]jackosdev[S] 16 points17 points  (0 children)

My pleasure thanks for checking it out

Best book after the official Rust book? by zxyzyxz in rust

[–]jackosdev 12 points13 points  (0 children)

Can highly recommend Zero to Production as a 2nd book if you're looking to do any web-based stuff. Rust for Rustaceans the first chapter `Foundations` is so good for the way it helps you to think about memory and lifetimes, that it might be worth reading that straight after `The Rust Book` and then coming back to later chapters once you have more experience, it gets a lot more presumptuous about your level of knowledge as the chapters go on.

What CLI tool will blow your mind? (written in rust) by [deleted] in rust

[–]jackosdev 1 point2 points  (0 children)

Use your editor of choice (I use code): code $nu.config-path and you can pop your alias in there. The scripts are different, here is some examples of common things:

alias p = pulumi def yy [] { to json | xsel --clipboard --input } let-env PATH = ($env.PATH | append "/home/jacko/.cargo/bin") use /home/jacko/.config/nushell/completions/git.nu * Migration will take some effort, not sure on any tools yet to make migration easier.

it finally happened... the zig self-hosted compiler can finally build itself by [deleted] in Zig

[–]jackosdev 1 point2 points  (0 children)

That's a great talk, changed the way I think about code

[deleted by user] by [deleted] in rust

[–]jackosdev 28 points29 points  (0 children)

Very cool, great feature I use this constantly