lib/wasm works with no_std

This commit is contained in:
Lachlan Sneff
2018-01-15 16:21:42 -05:00
committed by Dan Gohman
parent 299e8a9737
commit 66a150e67a
8 changed files with 58 additions and 0 deletions

View File

@@ -11,6 +11,10 @@ use cretonne::settings;
use wasmparser;
use std::error::Error;
// this is for no_std builds, but has no affect on regular builds
use std::vec::Vec;
use std::string::String;
/// Compute a `ir::ExternalName` for a given wasm function index.
fn get_func_name(func_index: FunctionIndex) -> ir::ExternalName {
ir::ExternalName::user(0, func_index as u32)