Search code examples
progressive-web-appswebassemblyrust-wasm

Best practice to secure wasm binary


I'm developing a PWA app that will possibly include a rust wasm binary. The binary executes a task that should be purchased. Are there any best practices for securing the binary so that it can't be executed without authorization?


Solution

  • The client-side security of WebAssembly is no different to that of JavaScript. There is no way to protect your code once it has been delivered to the client browser. They can always edit it, inspect it, execute it in ways you hadn’t designed.

    If you have something of value, that you charge clients for, keep it on the server!