Support Wasm Compilation
Closed this issue · 7 comments
Is it possible to support compiling to Wasm when using packages like super_clipboard
and super_drag_and_drop
? I tried compiling it against Wasm but it fails with ffi
.
../../../../.pub-cache/hosted/pub.dev/super_native_extensions-0.8.22/lib/src/native/data_provider_manager.dart:2:1:
Error:
'dart:ffi' can't be imported when compiling to Wasm.
import 'dart:ffi';
What error do you get exactly? And which version are you using? The ffi should not be using during wasm compilation.
I updated the issue description with the error I am getting. I am using the latest version 0.8.22
.
I see. I think using dart.library.js
conditional import is what broke recently. I probably need to use dart.library.js_interop
instead.
That could be one of the issues but I am seeing a lot of 'dart:ffi' can't be imported when compiling to Wasm.
errors coming from super_native_extensions
.
That is expected with conditional imports not working.
@knopp I can confirm that this now compiles to wasm without any issues.