wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

Support no_std (again)

Open stevefan1999-personal opened this issue 1 year ago • 3 comments

Thanks for filing a feature request! Please fill out the TODOs below.

Feature

Add no_std back to the equation.

Benefit

So we can build a safer eBPF implementation in Linux kernel

Implementation

We could use https://gitlab.com/jD91mZM2/no-std-compat for this.

Alternatives

Don't attempt to rewrite eBPF

stevefan1999-personal avatar May 22 '23 09:05 stevefan1999-personal

I assume you want no_std in Cranelift specifically, and you don't care about Wasmtime, right?

The most recent time this came up was #6131 and the discussion there is still relevant. Unfortunately the person who authored that PR apparently gave up and deleted their branch after we asked for the additional work we'd need to make sure we can reliably maintain no_std support for Cranelift going forward.

There's some work to do but I think it's a fairly straightforward path if you want to work on it. I'd be happy to answer questions!

jameysharp avatar May 22 '23 19:05 jameysharp

I assume you want no_std in Cranelift specifically, and you don't care about Wasmtime, right?

Correct. I should be more specific.

The most recent time this came up was #6131 and the discussion there is still relevant. Unfortunately the person who authored that PR apparently gave up and deleted their branch after we asked for the additional work we'd need to make sure we can reliably maintain no_std support for Cranelift going forward.

Well, he/she just deleted all their GH repos. But if we still have the patch set we can just try and apply the hunks manually. But this would mean their cobtribution commit would be lost. Not sure if I can just cherrypick the the PR branch...

There's some work to do but I think it's a fairly straightforward path if you want to work on it. I'd be happy to answer questions!

stevefan1999-personal avatar May 23 '23 01:05 stevefan1999-personal

If still interested, I've opened a plan for this at https://github.com/bytecodealliance/wasmtime/issues/8341

alexcrichton avatar Apr 11 '24 20:04 alexcrichton

Wasmtime now supports no_std, and I'll defer supporting no_std in Cranelift to https://github.com/bytecodealliance/wasmtime/issues/1158, so closing this.

alexcrichton avatar May 10 '24 02:05 alexcrichton