mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-21 00:36:33 +00:00
Merge pull request #1654 from fitzgen/no-import-shims
Skip generating JS import shims when unnecessary
This commit is contained in:
crates
backend
cli-support
macro-support
src
shared
src
webidl
src
tests/wasm
@ -52,6 +52,9 @@ macro_rules! attrgen {
|
||||
(typescript_custom_section, TypescriptCustomSection(Span)),
|
||||
(start, Start(Span)),
|
||||
(skip, Skip(Span)),
|
||||
|
||||
// For testing purposes only.
|
||||
(assert_no_shim, AssertNoShim(Span)),
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -495,8 +498,10 @@ impl<'a> ConvertToAst<(BindgenAttrs, &'a ast::ImportModule)> for syn::ForeignIte
|
||||
return Err(Diagnostic::span_error(*span, msg));
|
||||
}
|
||||
}
|
||||
let assert_no_shim = opts.assert_no_shim().is_some();
|
||||
let ret = ast::ImportKind::Function(ast::ImportFunction {
|
||||
function: wasm,
|
||||
assert_no_shim,
|
||||
kind,
|
||||
js_ret,
|
||||
catch,
|
||||
|
Reference in New Issue
Block a user