FuelLabs / FuelLabs/fuelup

support installing forc plugins from crates.io

Open
#313 2 comments 0 reactions 0 assignees View on GitHub
new feature
Dominant language
Rust
Stars
282
Forks
150
Avg merge
2d 17h
Merged PRs (30d)
2

Description

## Proposal

allow fetching arbitrary `forc` plugins from published crates on crates.io.

## Problem

Currently we are relying on 1) what is published on our channel TOMLs to allow downloading an entire distributed toolchain and 2) manually downloading from the release through github API itself.

As we've seen from @otrho 's `forc-dis`, there may be some useful plugins that are optional and may not need to be shipped officially (yet!).

We will probably have to allow this anyway (and other options as suggested in #310, an `--ipfs` option?) at some point, especially if we want community-built plugins.

## Implementation details

I imagine this could be a wrapper around `cargo install --root `. This downloads, for example, `forc-dis` to the toolchain directory, and does all the linking that makes components/plugins click with `fuelup`. This could be provided through `fuelup component add` with a new option `--cargo`:

`fuelup component add --cargo forc-dis`

## Potential issues

My main concern is that this might make the interaction between `cargo` and `fuelup` even more confusing than it already is. It could be better to just not blur the lines (for now?) between the 2 package/toolchain managers even if we're missing some flexibility.

This also adds an implicit dependency on cargo, hence we should be supporting it through an option instead of being a main feature of fuelup - if we want to go with this, we should probably also make sure that users are aware of this implicit dependency through the fuelup book and appropriate warning/failure messages if you run the command without `cargo`.

Another potential issue is that we would be allowing users to arbitrarily download plugins to their toolchain directories and this could be a potential source of vulnerability since its not in-house code anymore, but then again this problem virtually exists for most executables that we download anyway.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.