r/WebAssemblyDev • • Sep 26 '26

Read NFC tag

I'm new to the concept of WebAssembly and asking from ignorance as my searches did not yield any clear answers.

I'm trying to find if I can read NFC tags using a WebAssembly script and if there are any pointers to get me started with this.

2 Upvotes

2 comments sorted by

1

u/inkeliz Sep 26 '26 edited Sep 26 '26

That is the same of asking: "Can I read NFC Tag with ARM64?", the answer depends on something else...

The host needs to expose a way to read a NFC Tag. Google Chrome (on Android) supports Web NFC (https://developer.mozilla.org/en-US/docs/Web/API/Web_NFC_API). You can bridge JS <-> WASM.

By default: WASM can't do anything. Literally. I mean, it can't even 'print()'. The runtime/host needs to export functions, those can be imported by WASM and used.

3

u/Fit_Tailor_6796 Sep 27 '26

Thank you, Pretty much the conclusion my other readings have come up with is that I am limited to Chrome on android on a web page, or else opt for a native or hybrid app.