• 0 Posts
  • 19 Comments
Joined 5 months ago
cake
Cake day: July 3rd, 2025

help-circle




  • It would be cool if there was an option to tell compiler how to name the object in the end. A strength of C mangling (or rather lack of it) is that you can take the object file and know beforehand the names. With mangling that will always depend on the version of the compiler. In practice, while mangled names are kind of stable, mangled C++ names are not really reliable in the real world

    If we could tell the compiler “in the end name/alias this function as prefix_or_name_of_cargo_my_super_duper_function”, we could then easily call it in an assembler/pure C/etc
    It could even be a separate wrapper. only for exposing stable function names in the object files




  • I think it might be nice if such posts included some background

    Build for web, desktop, and mobile, and more with a single codebase. Zero-config setup, integrated hot-reloading, and signals-based state management. Add backend functionality with Server Functions and bundle with our CLI.

    I don’t think everyone is up to date on every Rust library that exists


  • I guess you are being downvoted because that is not directly connected to Rust. It would be a problem with any language

    Yeah, compiling from source on Windows is a mess. In that regard it is not a functional OS, one has to install a lot of tools in order to compile the tiniest thing

    I would put both ways into the descriptions, just for that one lost person that for some reason has to compile from source on Windows, just to give them a hint where to start. I think, it’s also very probable that if they have to compile from source, they might have a lot of issues with getting VS to work.
    It will be a pain anyway, most will probably just download your binary and hope you prefer mining bitcoin instead of ransoming their whole drive


  • INeedMana@piefed.ziptoRust@programming.devThe Handle trait
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    I don’t know but it could be anything else than an Arc. Obviously you should still be able to take a usual reference to such a thing.

    Maybe. My point is that unless you want to, for example, have a reference that you switch between which object it references, I think you would be fine with using the ref-counted reference. With eventual optimization done via compiler when it’s sure the code won’t be trying to access the object after it got deleted. But even if I’m wrong, there could be another way to get a pure reference

    This proposal as I understand it is an attempt at making reference-counting more ergonomic.

    Yes, and IMO by using Handle for that it breaks a pattern. Rust keeps * and & for speaking about values and memory management (I want data vs I want reference). Using a trait for ref-counted referencing adds another layer. So suddenly we have *, & and ::Handle(). You see what I’m getting at?







  • INeedMana@piefed.ziptoRust@programming.devWhich GUI crate?
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    Personally I would start with plain SDL2 and then add GTK. Both of them are language-agnostic, so you are learning something that you can use in other projects too. And are widely used, so while the Rust binds might add some spiciness to the mix, it should be easier to search for clues