Saturday, April 16, 2022

Re: [wip] wasi sdk (& enable wasm sandboxing in firefox)

On 22/04/16 06:25PM, Landry Breuil wrote:
> Hi,
>
> since firefox 95 one can use a 'wasi sysroot' to sandbox some external
> libraries bundled within firefox (eg Graphite, Hunspell, Ogg, Expat and
> Woff2) by building them first from C/C++ to wasm then to C via wasm2c.
>
>
> to achieve that, i had to wrap up 4 ports on top of llvm 13.0.0 bits:
> wasi-libc, wasi-libcxx, wasi-libcxxabi & wasi-compiler-rt. I've settled
> for the same version we use for devel/llvm, without any patches, and so
> far only tested it on amd64.
>
> with those 4 ports installed, and the below diff, i have a build of
> firefox 100.0b6 that runs here, no idea how to test differences in
> runtime though.

I really like this idea, those 4 ports compile/run fine on amd64, and
build fine on arm64.

With those new ports + patch, I have a working build of Fx 99.0.1 with
wasi sandboxing here on my amd64, no difference noticed so far.

I'm about to test this on arm64 but there doesn't seem to be
pre-compiled package for rust, so that will take some time as that
arm64 box will have to compile a lot of things...

After checking a few AUR packages, I think the current compiling setup
is alright, pulling the whole LLVM tree is probably the only way to do
it.

No comments:

Post a Comment