News for hackers. Stuff that matters.
Re:Zeroperl: Sandboxing Perl with WebAssembly by dang on Tuesday February 11, 2025 @05:43PM (#43019312)
Since this is Part 1, we merged the comments from the Part 2 thread hither:

Get in loser. We're rewinding the stack - https://news.ycombinator.com/item?id=43014070

Readers may want to look at both articles of course!

Re:Zeroperl: Sandboxing Perl with WebAssembly by ncruces on Tuesday February 11, 2025 @06:35PM (#43019768)
Oh I'm so interested in this.

I've wanted to use wazero to run my Exiftool [1] for quite a while. Just as I use wazero to sandbox dcraw [2].

But WASI Perl never materialized.

This may just be what I'm missing.

[1]: https://github.com/ncruces/go-exiftool

[2]: https://pkg.go.dev/github.com/ncruces/[email protected]/pkg...

Re:Zeroperl: Sandboxing Perl with WebAssembly by mdaniel on Tuesday February 11, 2025 @10:37PM (#43021600)
The ongoing ... lively ... discussion about "wasm all the things" may interest this audience, too: https://news.ycombinator.com/item?id=43020684
Re:Zeroperl: Sandboxing Perl with WebAssembly by rurban on Wednesday February 12, 2025 @01:27AM (#43022490)
"percc" just does not work?

He obviously he meant my perlcc, it is maintained for compatible perl versions and it works and is used in industry.

Re:Zeroperl: Sandboxing Perl with WebAssembly by andrew_rfc on Wednesday February 12, 2025 @02:02AM (#43022638)
You cannot today build anything on the Blead of Perl with perlcc.

Support has languished because the language changed fast enough that it never kept up. It may be used in the industry, but for a modern Perl application (or anything past 5.10) it won’t work. Hence why it was removed.

Re:Zeroperl: Sandboxing Perl with WebAssembly by rurban on Wednesday February 12, 2025 @01:30AM (#43022505)
This guy is just crazy. https://github.com/libexif/libexif exists and is much easier to use than compiling perl to wasm, just to run the overly slow exiftool.
Re:Zeroperl: Sandboxing Perl with WebAssembly by andrew_rfc on Wednesday February 12, 2025 @01:56AM (#43022613)
I’m not sure where you got the idea it’s slow, but it executes within 30% of native speed. Which means extracting the metadata from a 30 GB pro video in my test takes 300-400ms.

Speaking of - libexif doesn’t support a lot of file formats, whereas ExifTool does.

If I always opt to choose the easiest path then I’m setting a precedent for myself that I will compromise on all my goals for half finished solutions that take me further from initial idea.

Re:Zeroperl: Sandboxing Perl with WebAssembly by transpute on Wednesday February 12, 2025 @01:51AM (#43022593)
There are security benefits to WASM sandboxing of client-side parsing of untrusted image files, to avoid scenarios like https://imagetragick.com