fn compile(
    input: impl AsRef<Path> + Debug,
    output: impl AsRef<Path> + Debug,
) -> Result<Fingerprint> {
    let input = input.as_ref();
    let fingerprint = Fingerprint::new(input)?;

    let mut bindings = Bindings::empty();
    bindings.extend(&lucet_wasi::bindings())?;
    bindings.extend(&Bindings::env(
        hostcall::HOSTCALL_LIST
            .iter()
            .cloned()
            .map(|f| (String::from(f), String::from(f)))
            .collect(),
    ))?;

    Lucetc::new(input)
        .with_bindings(bindings)
        .shared_object_file(output)?;

    Ok(fingerprint)
}
/// Compiles a WASM module located at `input` and writes an optimized shared object to `output`.
Compiles a WASM module located at `input` and writes an optimized shared object to `output`.
Compiles a WASM module located at ` input ` and writes an optimized shared object to ` output ` .
fn compile(
    input: impl AsRef<Path> + Debug,
    output: impl AsRef<Path> + Debug,
) -> Result<Fingerprint> {
    let input = input.as_ref();
    let fingerprint = Fingerprint::new(input)?;
    let mut bindings = Bindings::empty();
    bindings.extend(&lucet_wasi::bindings())?;
    bindings.extend(&Bindings::env(
        hostcall::HOSTCALL_LIST
            .iter()
            .cloned()
            .map(|f| (String::from(f), String::from(f)))
            .collect(),
    ))?;
    Lucetc::new(input)
        .with_bindings(bindings)
        .shared_object_file(output)?;
    Ok(fingerprint)
}
fn compile ( input : impl AsRef < Path > + Debug , output : impl AsRef < Path > + Debug , ) -> Result < Fingerprint > { let input = input . as_ref ( ) ; let fingerprint = Fingerprint :: new ( input ) ? ; let mut bindings = Bindings :: empty ( ) ; bindings . extend ( & lucet_wasi :: bindings ( ) ) ? ; bindings . extend ( & Bindings :: env ( hostcall :: HOSTCALL_LIST . iter ( ) . cloned ( ) . map ( | f | ( String :: from ( f ) , String :: from ( f ) ) ) . collect ( ) , ) ) ? ; Lucetc :: new ( input ) . with_bindings ( bindings ) . shared_object_file ( output ) ? ; Ok ( fingerprint ) }
Compiles a WASM module located at `input` and writes an optimized shared object to `output`.
Compiles a WASM module located at ` input ` and writes an optimized shared object to ` output ` .
input
impl AsRef<Path> + Debug
output
impl AsRef<Path> + Debug