255 private links
An experiment to replace Nginx with Axum.
How to map integer types to rust integer types and more.
How to tackle C macros and inline functions in Rust?
Guo put together a ""hack"". His idea was to use Clang to compile helpers.c into LLVM bytecode. Then, for each Rust crate, ask the compiler to emit bytecode as well. Once everything is in the form of LLVM bytecode, it can be fed back into Clang with LTO turned on to produce a combined object file with the helpers inlined.
and more challenging topics.
A competitor to dig
There is also a dedicated section for JS https://shaarli.lyokolux.space/shaare/DhH-Zw
- Copy and Clone can diverge
- Really long place expression (if)
- krate vs crate_
- Rust has reference variables! kinda..
- &* is actually useful
About high and low-programming languages
Human feedbacks
Are we web yet? Well yes but with extra work. A lot of work.
The author provides its experience.
All the things I love about Django, could we have those for a Rust web framework so that we can reap the benefits of Rust without having to go needlessly slowly?
An attempt: https://git.sr.ht/~ntietz/newt
One approach for achieving compile-time checks, might be having two different structs for alive and dead player, and have the necessary methods implemented for them respectively.
why it’s bad:
- the API is not clean. We are storing the same fields in both Dead and Alive player, while they are both just Players.
- the end-user has to know when to create an instance of Alive player and Dead player. It might be simple to guess in this example, but imagine much more complex/abstract types. If possible, our API should be responsible for when to use which type, not the end user.
Solution 3 is better with an struct that uses a state! The state determines how is the player and different functions are implemented for a player state.
Note it is similar to typescript with an interface or type such as Player<'alive'>
of type Player<T> = { state: T, ...}
A web browser with emphasis on local-first data storage.
Repository: https://github.com/OkuBrowser/oku.
Discussions: https://discu.eu/q/https://okubrowser.github.io/
A lot of Rust lectures lately. See https://video.infosec.exchange/w/p/aUTyZA8bp5b8EDeT8VaV6M
It is built with Rust from an Haskell rewrite as far as I understand.
how to compile and run JS code in rust through V8