Closed andreriesco closed 3 months ago
On a post in the Ubuntu website it is recommended to install Rust on Ubuntu through rustup, with this commands:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install stable
@tronical perhaps you can help me here. What would you say is the proper way to install the Rust packages that the rustSlint
template depends on?
"packages": [
"openssh-client",
"sshpass",
"cargo",
"rustc",
"rust-clippy",
"rust-lldb",
"rust-src",
"rust-gdb"
]
Or if they should be installed through apt
what extra steps are needed, like adding a source for example.
So the installation of this packages can be changed to an installation script, like is being done for the .NET SDK packages for examples
I would advise against installing Rust from distro packages. For rustSlint we take it from the slint-sdk container, packaged here:
(so rustup)
Can this slint-sdk container also be used to build x86 code to run on the host OS, for local debugging? Right now, for the local debugging on the host OS, the code is being built natively on the host, by this task. This is the way the code is built for local debugging on all templates, but if for the Rust Slint is complex to set the build environment on the host and if there is a slint-sdk container that can be used to build x86 code, maybe we can change this for the Rust Slint template and start building the code in the slint-sdk x86 container.
In theory it can be used for x86-64 builds. In practice a proper local build will be faster and give an overall much better development experience. Slint is cross-platform, so for example the local builds also work on macOS and Windows - as opposed to the docker Linux approach.
@tronical I tried installing Rust using the following script, as described in the Rust Get Started, and with that the Local Debugging on the rustSlint template seem to have worked. Are the dependencies installed through this script enough for the proper template compilation and runtime on the host OS or there is something extra that needs to be installed or configured?
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Hi, yes, that should about cover it. On Windows I think you also need the MSVC build tools, Xcode on macOS. The typical dev setup.
Rust dependencies are not being installed correctly through apt, therefore they need to be installed through a installation script