Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768807
rust.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
891 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, 10:38 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260018
Default Alt Text
rust.py (891 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment