Some doubts before jumping (Flatpaks and system libs)

Hello there!
I’ve been following Fedora Silverblue for a while and right now I could finally do the jump, but I have still some doubts regarding how things are with dev environment and system libs.

If I understood the concept correctly, the way I’m supposed to let’s say, do something with Rust, would be creating a container with Toolbox, and inside this container install Rust. Now, I like VSCode and it’s available on Flathub, so VSCode (From Flatpak) Rust extension will have to “connect” with the container to be able to compile code that resides inside my $HOME dir? Is that the way it’s supposed to work? Sound really interesting but I’m not sure if this works.

My other question is somehow related, getting some SDK or language tools and libs is one thing, but what if I want to install LaTeX package and want to work with some LaTeX GUI App? VScode since it’s a development tool may have some tricks to do the first thing, but how about TexStudio?

Thanks a lot!!!

I’ve done a bit of development in Rust on Silverblue. There’s a couple of ways to do it.

You can create a toolbox and install Rust (rustc and cargo, they are separate packages iirc) inside of it via the package manager, and use the VS Code flatpak to edit code. I’ve not had success getting the RLS to run with the VS Code flatpak however, even if I install the flatpak Rust language runtime. I imagine the compile button will work this way, but I always go into the terminal and run cargo build anyway, so I’ve actually never tried it.

I wrote a script that can automatically create a toolbox for you and set up a VS Code workspace with settings to make the built-in terminal automatically enter that toolbox when you open it. It’s got a few rough edges though, for example if you feed it a path that doesn’t exist it doesn’t create it, and the path it tries to navigate to for the project uses /var/home, which does not exist inside the container, so it defaults to the home directory. I’ll get around to fixing what I can eventually.

That approach allows you to install rust in the container, isolated from your host system. However this does not give you rustup, so you can’t add components such as rust-fmt, clippy, or xbuild, xrun, and xtest. In order to do that, you have to run the script from the rust website to install rust inside your home directory. Since toolbox has access to your home directory, that is being installed on your host system, not the toolbox, which kind of defeats the point unfortunately. There may be a way to confine the .cargo directory to the toolbox or something, or maybe locate it somewhere confined to the toolbox and use a symlink or something, but I haven’t really messed around with that.

Unfortunately I don’t know anything about TexStudio, but it looks like there is a Flatpak available for it, that likely includes the LaTeX dependencies. If that doesn’t work for you, then in theory you could actually install that and its dependencies in a toolbox. Graphical applications will run in the toolbox just fine, but you need to either launch them from the terminal or create an edited .desktop file that runs toolbox run -c <name> <command> instead of just the command

Some things are still a bit fiddly now, but you could always try it out and give feedback to help improve these situations.

First of all, thanks a lot for the explanation.

First: Language runtimes. So it seems like compilers/development SDK can be added into Flatpak allowing VSCode Flatpak access to it, but this looks to me more like a quickfix rather than a solution, needing every single language to have it’s own Flatpak runtime as a Flatpak.

The script thing while can help doens’t allow the cools things that RLS + IntelliSense allows. Maybe it’s because I’m not a professional old school programmer, but having those features are a pretty big deal for me.

I would love to test SB, but seems to me that the things I need are still the rough edges of the project. Is there any issue on GitHub/Gitlab that I can follow?

Thanks a lot!