r/GoogleAppsScript • • Apr 04 '24

Guide WebAssembly in Apps Script

https://justin.poehnelt.com/posts/apps-script-wasm/
10 Upvotes

7 comments sorted by

1

u/jpoehnelt Apr 04 '24

This is part of my Google Cloud Next 24 presentation on Unleashing the power of Rust, Python, and WebAssembly in Apps Script. You can see the session details at: Lightning Talk.

Checkout the code in the GitHub repo and the Youtube playlist.

1

u/dimudesigns Apr 05 '24

I've also been messing with WASM and GAS over the years. You landed on some of the same strategies as I have (encoding the WASM as a base64 string, bundlers and what not). However, one of the major bottlenecks for me when trying to incorporate WASMs of some popular tools - such as the port for wkhtmltopdf - is the reliance on Javascript Service Workers, which GAS doesn't support. Did you run into this issue? Have you managed to work around it?

1

u/jpoehnelt Apr 05 '24

I've been using Rust to generate the WASM and voiding anything with bindings to C. Haven't had that issue.

1

u/Nick-Crews Sep 16 '25

u/jpoehnelt Can you comment on the viability of deploying duckdb-wasm to google sheets? Even if I got it working, would it be a terrible idea because of the IO overhead of needing to read in all the individual sheets, feeding that into the duckdb wasm, and then re-writing it back out to the sheets on query completion? It looks like they have examples already of creating the wasm-js bridge in their own special way, and I'm not sure if this is migratable to the implementation method in the repo you linked.

1

u/jpoehnelt Sep 16 '25

That does sound like a lot of overhead. Probably not worth the effort. Assuming the desire is to keep the data local to Apps Script with no external services?

1

u/Nick-Crews Sep 26 '25

Yeah, the idea was to be able to keep it all in Apps Script, via a library that I can import and use in any sheet in my org. I'll report back if I actually dive down this rabbit hole, but I probably won't. Thanks for the response!

2

u/squired Aug 30 '25

This is some very helpful information btw. You've given me a new fork to explore for use in scalable scraper agents, thank you!