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
I think it would be nice to make some type of easyblock for Rust/cargo packages. They are a bit of a special animal. Typically lots and lots of dependencies in cargo making it completely infeasible to make easyconfigs for each one.
We already have some easyconfigs that use cargo, and they are downloading all their dependencies at build time.
Another neat thing is that almost all Rust apps just link down to a single binary, no dynamic linking, so they can typically live at SYSTEM level at runtime.
So, ignoring the downloading of all those cargo deps at runtime, a typical easyconfig for a Rust software today could look like ripgrep-13.0.0.eb
easyblock='Binary'name='ripgrep'version='13.0.0'homepage='https://github.com/BurntSushi/ripgrep'description="""ripgrep is a line-oriented search tool that recursively searches the current directory for a regexpattern."""toolchain=SYSTEMgithub_account='BurntSushi'source_urls= [GITHUB_SOURCE]
sources= ['%(version)s.tar.gz']
checksums= ['0fb17aaf285b3eee8ddab17b833af1e190d73de317ff9648751ab0660d763ed2']
builddependencies= [
('Rust', '1.65.0', '', ('GCCcore', '12.2.0')),
]
extract_sources=Trueinstall_cmd="cargo install --root %(installdir)s --path ."sanity_check_paths= {
'files': ['bin/rg'],
'dirs': [],
}
sanity_check_commands= ["rg --help"]
moduleclass='tool'
but we can clean up some of those steps with a custom easyblock for the install command and the source extraction.
Downloading of sources would also be nice without having to rely on github for the base package. I mean, if we are download 99% of the code at build time anyway, we might as well just have it download the sources for the top level package as well.
I think it would be nice to make some type of easyblock for Rust/cargo packages. They are a bit of a special animal. Typically lots and lots of dependencies in cargo making it completely infeasible to make easyconfigs for each one.
We already have some easyconfigs that use cargo, and they are downloading all their dependencies at build time.
Another neat thing is that almost all Rust apps just link down to a single binary, no dynamic linking, so they can typically live at SYSTEM level at runtime.
So, ignoring the downloading of all those cargo deps at runtime, a typical easyconfig for a Rust software today could look like
ripgrep-13.0.0.eb
but we can clean up some of those steps with a custom easyblock for the install command and the source extraction.
Downloading of sources would also be nice without having to rely on github for the base package. I mean, if we are download 99% of the code at build time anyway, we might as well just have it download the sources for the top level package as well.
If we want to, we could probably cache some sources and tell cargo to pick them up from the sources dir.
https://doc.rust-lang.org/cargo/reference/registries.html
https://users.rust-lang.org/t/using-crates-in-offline-environment/72970/22
The text was updated successfully, but these errors were encountered: