Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769625
rust.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
907 B
Referenced Files
None
Subscribers
None
rust.py
View Options
# -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Salt — Rust module
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Description: Provide support for Rust properties
# License: BSD-2-Clause
# -------------------------------------------------------------
from
salt.utils.path
import
which
as
path_which
def
__virtual__
():
"""
Only load if the Rust compiler is available
"""
return
(
path_which
(
"rustc"
)
is
not
None
,
"The Rust execution module cannot be loaded: rustc not installed."
,
)
def
get_rustc_triplet
():
"""
A function to get a node triplet for Rust toolchains.
CLI Example:
salt * rust.get_rustc_triplet
"""
# Thanks to @semarie for that tip.
return
__salt__
[
"cmd.shell"
](
"rustc -vV | sed -ne 's/^host: //p'"
)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Mon, Nov 25, 16:16 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260515
Default Alt Text
rust.py (907 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment