mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 20:41:24 +00:00
Add a raw_module
attribute to #[wasm_bindgen]
This allows subverting the checks and resolution performed by the `module` attribute added as part of [RFC 6] and has been discussed in #1343. Closes #1343 [RFC 6]: https://github.com/rustwasm/rfcs/pull/6
This commit is contained in:
@ -2836,6 +2836,7 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
// not sure how to import them.
|
||||
let is_local_snippet = match import.module {
|
||||
decode::ImportModule::Named(s) => self.cx.local_modules.contains_key(s),
|
||||
decode::ImportModule::RawNamed(_) => false,
|
||||
decode::ImportModule::Inline(_) => true,
|
||||
decode::ImportModule::None => false,
|
||||
};
|
||||
@ -2921,11 +2922,13 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
name,
|
||||
field,
|
||||
},
|
||||
decode::ImportModule::Named(module) => Import::Module {
|
||||
module,
|
||||
name,
|
||||
field,
|
||||
},
|
||||
decode::ImportModule::Named(module) | decode::ImportModule::RawNamed(module) => {
|
||||
Import::Module {
|
||||
module,
|
||||
name,
|
||||
field,
|
||||
}
|
||||
}
|
||||
decode::ImportModule::Inline(idx) => {
|
||||
let offset = *self
|
||||
.cx
|
||||
|
Reference in New Issue
Block a user