Other rust on FreeBSD - correct way to add more targets?

So I want to use rust on FreeBSD to compile code for microcontrollers. I have both cargo and rustc installed (from packages), I have set up a project to build for a msp430 microcontroller, and try it:
Code:
tingo@kg-core2:/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-g2553 $ cargo build
   Compiling proc-macro2 v1.0.50
   Compiling critical-section v1.1.1
   Compiling vcell v0.1.3
   Compiling quote v1.0.23
   Compiling syn v1.0.107
   Compiling rand_xoshiro v0.6.0
   Compiling rand v0.8.5
   Compiling msp430-rt v0.4.0
   Compiling msp430g2553 v0.4.0
error[E0463]: can't find crate for `core`
  |
  = note: the `msp430-none-elf` target may not be installed
  = help: consider downloading the target with `rustup target add msp430-none-elf`

error[E0463]: can't find crate for `compiler_builtins`
(there are more errors after this, but they are redundant).
Now, rustup doesn't exist as package or port in FreeBSD.
So what's the correct way to add more targets to the rust toolchain under FreeBSD?

Tested on
Code:
tingo@kg-core2:/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-g2553 $ freebsd-version -ku
13.1-RELEASE-p3
13.1-RELEASE-p5
tingo@kg-core2:/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-g2553 $ uname -a
FreeBSD kg-core2.kg4.no 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64

tingo@kg-core2:/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-g2553 $ pkg info rust\*
rust-1.66.0
 
I could try that, but it doesn't feel like the right way (on FreeBSD) either - the rust compiler is used and needed by the other packages installed on FreeBSD.
 
Back
Top