bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.14k stars 1.27k forks source link

Support no_std (again) #6424

Closed stevefan1999-personal closed 4 months ago

stevefan1999-personal commented 1 year ago

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

jameysharp commented 1 year ago

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!

stevefan1999-personal commented 1 year ago

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!

alexcrichton commented 5 months ago

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

alexcrichton commented 4 months ago

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.