You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A package manager such as Cargo solves two major problems
Getting all libraries and tools that are required to build a project.
Reproducible builds. If I pick up a project, I know exactly what dependencies were used.
Problems
Trunk needs to be manually installed. When cargo binstall trunk is used, then one first has to install binstall. Alternatively, cargo install trunk --locked can be used, provided that one doesn't run into the current OpenSSL/Rustls issues. Ideally, this step would be automatic.
With the upcoming cargo-script support, both of these issues could be solved eventually.
I can add a single trunk.rs script to my repositories, and tell my team members to use cargo trunk.rs serve --open instead of cargo run. They do not need to do anything else. cargo trunk.rs --help, cargo trunk.rs build, etc would just work.
The script can depend on an exact version of Trunk. Support for lockfiles is planned.
An experimental version of this is possible today. A file with the following contents would be checked into source control, and then everyone can run Trunk without needing to manually install it.
#!/usr/bin/env cargo +nightly -Zscript
---cargo
[package]
edition = "2024"[dependencies]
trunk = { git = "https://github.com/stefnotch/trunk"}
tokio = { version = "1.42.0"}
---
/// Run with/// cargo +nightly -Zscript trunk.rs serve --open /// /// Eventually we will be able to do /// cargo trunk.rs serve --open
#[tokio::main]
async fnmain(){let a = trunk::run_cli().await;println!("{:?}", a);}
The text was updated successfully, but these errors were encountered:
Background
A package manager such as Cargo solves two major problems
Problems
cargo binstall trunk
is used, then one first has to installbinstall
. Alternatively,cargo install trunk --locked
can be used, provided that one doesn't run into the current OpenSSL/Rustls issues. Ideally, this step would be automatic.Request
With the upcoming
cargo-script
support, both of these issues could be solved eventually.I can add a single
trunk.rs
script to my repositories, and tell my team members to usecargo trunk.rs serve --open
instead ofcargo run
. They do not need to do anything else.cargo trunk.rs --help
,cargo trunk.rs build
, etc would just work.The script can depend on an exact version of Trunk. Support for lockfiles is planned.
An experimental version of this is possible today. A file with the following contents would be checked into source control, and then everyone can run Trunk without needing to manually install it.
The text was updated successfully, but these errors were encountered: