class MStrap::Runtimes::Rust

Overview

Rust runtime management implmentation. It contains methods for interacting with Rust via ASDF and bootstrapping a Rust project based on conventions.

Defined in:

mstrap/runtimes/rust.cr

Instance Method Summary

Instance methods inherited from class MStrap::Runtime

asdf_exec(command : String, args : Array(String), runtime_version : String | Nil = nil) asdf_exec, asdf_install_plugin asdf_install_plugin, asdf_plugin_name : String asdf_plugin_name, bootstrap bootstrap, current_version current_version, has_asdf_plugin? has_asdf_plugin?, has_version?(version) has_version?, has_versions? has_versions?, install_packages(packages : Array(Defs::PkgDef), runtime_version : String | Nil = nil) : Bool install_packages, installed_versions installed_versions, language_name : String language_name, latest_version latest_version, matches? : Bool matches?, setup setup, with_dir_version(dir, &) with_dir_version

Instance methods inherited from module MStrap::DSL::System

cmd(env : Hash | Nil, command : String, args : Array(String) | Nil, shell = true, input = Process::Redirect::Inherit, output = Process::Redirect::Inherit, error = Process::Redirect::Inherit, quiet = false, sudo = false) cmd

Instance methods inherited from module MStrap::DSL::Logging

log(msg) log, logc(msg) logc, logd(msg) logd, logn(msg) logn, logw(msg) logw, success(msg) success

Instance Method Detail

def bootstrap #
Description copied from class MStrap::Runtime

Bootstrap the current directory for the runtime


[View source]
def current_version #
Description copied from class MStrap::Runtime

Returns the version of the language runtime used by the current directory or specified by the environment.

NOTE This will not traverse parent directories to find versions files.


[View source]
def install_packages(packages : Array(Defs::PkgDef), runtime_version : String | Nil = nil) : Bool #
Description copied from class MStrap::Runtime

Installs global packages for the runtime with an optional version specification, and optional runtime version.

NOTE The version specification is dependent upon the underlying package manager and is passed verbatim.


[View source]
def language_name : String #
Description copied from class MStrap::Runtime

Name of the language as a string. Always lowercase.


[View source]
def matches? : Bool #
Description copied from class MStrap::Runtime

Returns whether the project uses the runtime


[View source]