Bug 285396 - add devel/rustup-init: Rust toolchain installer, version 1.28.1
Summary: add devel/rustup-init: Rust toolchain installer, version 1.28.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-14 09:51 UTC by King John
Modified: 2025-03-27 18:55 UTC (History)
1 user (show)

See Also:


Attachments
add lang/rustup-init, version 1.28.1. (73.52 KB, patch)
2025-03-14 09:51 UTC, King John
no flags Details | Diff
add devel/rustup-init (74.09 KB, patch)
2025-03-22 04:57 UTC, King John
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description King John 2025-03-14 09:51:22 UTC
Created attachment 258656 [details]
add lang/rustup-init, version 1.28.1.

Add rustup-init to install rustup toolchains.
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2025-03-20 10:01:05 UTC
I'm not sure lang is the right place to put rustup, it's not a lang per se just a tool to download rust*
Comment 2 King John 2025-03-21 02:54:52 UTC
(In reply to Mikael Urankar from comment #1)
Which category would you like to suggest to move to ? I could update the patch as required.
Comment 3 King John 2025-03-21 06:59:19 UTC
(In reply to Mikael Urankar from comment #1)
What about moving to category devel ?
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2025-03-21 08:17:01 UTC
(In reply to King John from comment #3)
Yeah, devel is more appropriate. No need to regen the patch, I'll do some tests and commit it under devel.
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2025-03-21 09:11:33 UTC
Can you fix these problems :
DISNAME, should be DISTNAME
pet portlint (out of order variable, and COMMENT shouldn't containt "The")

pkg-descr is a bit short, maybe something like this :
Rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between stable, beta, and nightly compilers and keep them updated. It makes cross-compiling simpler with binary builds of the standard library for common platforms. And it runs on all platforms Rust supports, including Windows.

while you're here, move the category to devel
Comment 6 King John 2025-03-22 04:57:21 UTC
Created attachment 258901 [details]
add devel/rustup-init
Comment 7 King John 2025-03-25 01:24:09 UTC
(In reply to Mikael Urankar from comment #5)
Updated. PTAL.
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-03-25 07:51:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f87e1a7a978e271387bf03d590640f3df264a2f2

commit f87e1a7a978e271387bf03d590640f3df264a2f2
Author:     King John <jinking.this@gmail.com>
AuthorDate: 2025-03-22 04:54:31 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-03-25 07:50:29 +0000

    devel/rustup-init: add new port

    Rustup-init is the official installer for the Rust programming language.
    It is used to install and manage Rust toolchains, including the Rust
    compiler (rustc), the package manager (cargo), and other related tools.
    Rustup itself is a toolchain multiplexer, meaning it allows you to easily
    switch between different versions of Rust (e.g., stable, beta, nightly) and
    manage cross-compilation targets. Rustup-init is the recommended way to install
    Rust, as it provides a consistent and flexible way to manage Rust installations
    across different platforms.

    PR:             285396

 devel/Makefile                          |   1 +
 devel/rustup-init/Makefile (new)        |  23 +
 devel/rustup-init/Makefile.crates (new) | 377 ++++++++++++++++
 devel/rustup-init/distinfo (new)        | 757 ++++++++++++++++++++++++++++++++
 devel/rustup-init/pkg-descr (new)       |   8 +
 devel/rustup-init/pkg-message (new)     |  14 +
 6 files changed, 1180 insertions(+)
Comment 9 Mikael Urankar freebsd_committer freebsd_triage 2025-03-25 07:52:57 UTC
(In reply to King John from comment #7)
Thanks, committed with some modifications:
sort USES
align WWW with the other lines
split pkg-descr at 80 char
Comment 10 King John 2025-03-25 10:18:01 UTC
(In reply to Mikael Urankar from comment #9)
Thanks.
Comment 11 Dmitry Marakasov freebsd_committer freebsd_triage 2025-03-25 15:35:51 UTC
Why is this port not named just `rustup`?
Comment 12 King John 2025-03-25 15:55:13 UTC
(In reply to Dmitry Marakasov from comment #11)
The rustup-init is used to install/intiallize rustup as ordinary/non-root user. The how-to is included in the installation msg: https://cgit.freebsd.org/ports/tree/devel/rustup-init/pkg-message. 
The official installation script https://sh.rustup.rs is download pre-compiled binary rustup-init and run it.
Comment 13 King John 2025-03-25 16:00:14 UTC
(In reply to Dmitry Marakasov from comment #11)
You can only get "pure" rustup binary after run "rustup-init" to install rustup into user's home directory (by default).
Comment 14 Dmitry Marakasov freebsd_committer freebsd_triage 2025-03-27 18:55:49 UTC
Got it, thanks for explanation!