Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this together with org.freedesktop.Sdk.Extension.rust-stable? #282

Open
teohhanhui opened this issue Sep 10, 2021 · 4 comments
Open

Comments

@teohhanhui
Copy link

When installing using rustup, it's possible to install both stable and nightly at the same time, and selecting a default (e.g. stable). Furthermore, it's possible to select a different version using e.g. cargo +nightly ... (apparently this functionality is provided by rustup)

This would be a great DX improvement for using Rust in Flatpak.

@orangecms
Copy link

You would need to run your app with the envionment variable enumerating SDKs to enable.

Here's my wrapper for using NeoVim:

#!/bin/sh

FLATPAK_ENABLE_SDK_EXT=rust-nightly flatpak run io.neovim.nvim $@

@teohhanhui
Copy link
Author

@orangecms That's really not great for DX...

@orangecms
Copy link

orangecms commented Dec 23, 2022

Agreed, the whole Ubuntu + Flatpak UX just sucks.

Having to figure that Ubuntu's NeoVim is outdated is how I ended up installing the FlatPak variant in the first place. Then I had to figure out that it loads the configuration from some other directoy buried down in ~/.var/... or something, already forgot again. Then googling again revealed that it clears its PATH setup somehow, and that's the sole reason to install this SDK non-sense, which means that it diverges from the actual compiler toolchain you'd use and you get everything twice. Plus, you gotta set it up redundantly per project (I have Rust stable and nightly projects that would otherwise carry a toolchain config, but Flatpak only looks at its env var).
Yuck yuck yuck.

@teohhanhui
Copy link
Author

teohhanhui commented Dec 23, 2022

@orangecms Offtopic, but you can consider using https://github.com/containers/toolbox or https://github.com/openSUSE/microos-toolbox to easily run a dev container, while having access to your home directory.

EDIT: Looks like there's https://github.com/89luca89/distrobox too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants