mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-12 08:31:21 +00:00
Add lots of rustdocs and clean up one line of code
This commit is contained in:
@ -22,6 +22,7 @@ pub mod sys {
|
||||
}
|
||||
pub use crate::sig_registry::SigRegistry;
|
||||
|
||||
/// Enum used to select which compiler should be used to generate code
|
||||
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum Backend {
|
||||
Cranelift,
|
||||
@ -30,6 +31,7 @@ pub enum Backend {
|
||||
}
|
||||
|
||||
impl Backend {
|
||||
/// Get a list of the currently enabled (via feature flag) backends
|
||||
pub fn variants() -> &'static [&'static str] {
|
||||
&[
|
||||
#[cfg(feature = "backend-cranelift")]
|
||||
@ -41,7 +43,7 @@ impl Backend {
|
||||
]
|
||||
}
|
||||
|
||||
/// stable string representation of the backend
|
||||
/// Stable string representation of the backend
|
||||
/// can be used as part of a cache key, for example
|
||||
pub fn to_string(&self) -> &'static str {
|
||||
match self {
|
||||
@ -111,6 +113,7 @@ impl Default for MemoryBoundCheckMode {
|
||||
}
|
||||
}
|
||||
|
||||
/// Controls which experimental features will be enabled
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Features {
|
||||
pub simd: bool,
|
||||
|
Reference in New Issue
Block a user