Stream: git-wasmtime

Topic: wasmtime / issue #11375 Cranelift as a functional languag...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 04 2025 at 07:48):

Germ210 opened issue #11375:

Currently, I am designing a language that requires tail call optimization and possibly calling C functions/being called from C functions. How does Cranelift handle cross ABI compatibility?

On top of that, Cranelift does not support 32 bit architectures, are there any plan for that? If not, what should I use for generating code for those architectures instead?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 17:06):

cfallin closed issue #11375:

Currently, I am designing a language that requires tail call optimization and possibly calling C functions/being called from C functions. How does Cranelift handle cross ABI compatibility?

On top of that, Cranelift does not support 32 bit architectures, are there any plan for that? If not, what should I use for generating code for those architectures instead?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 17:06):

cfallin commented on issue #11375:

How does Cranelift handle cross ABI compatibility?

We have a notion of calling convention in signatures; Cranelift supports a function that is compiled using one calling convention calling a function with another convention(and this is well-tested and used in practice in Wasmtime). So you should be able to define your external C functions using sys_v (on Unix/Linux/macOS) or fastcall (on Windows) conventions and the calls should work fine. I'd encourage you to peruse our documentation for more.

On top of that, Cranelift does not support 32 bit architectures, are there any plan for that?

You can find all of our tracking issues for supporting new ISAs using the cranelift:new-target issue label: link. For example, arm32 in #1173 and x86-32 in #1980 are both 32-bit platforms.

The main issue is developer time: we don't have enough full-time contributors to Cranelift to develop and maintain backends for all of these ISAs. As I've described in comments in most of those listed issues, we estimate the effort to build a new backend at around 3 months of work / 20k lines of code. And we expect new backends to ideally have a fulltime maintainer available (i.e., not a one-time develop-and-dump prospect).

If not, what should I use for generating code for those architectures instead?

While this question is outside the scope of the Cranelift issue tracker, for "some other compiler" I'd recommend LLVM by default.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 17:06):

cfallin edited a comment on issue #11375:

How does Cranelift handle cross ABI compatibility?

We have a notion of calling convention in signatures; Cranelift supports a function that is compiled using one calling convention calling a function with another convention (and this is well-tested and used in practice in Wasmtime). So you should be able to define your external C functions using sys_v (on Unix/Linux/macOS) or fastcall (on Windows) conventions and the calls should work fine. I'd encourage you to peruse our documentation for more.

On top of that, Cranelift does not support 32 bit architectures, are there any plan for that?

You can find all of our tracking issues for supporting new ISAs using the cranelift:new-target issue label: link. For example, arm32 in #1173 and x86-32 in #1980 are both 32-bit platforms.

The main issue is developer time: we don't have enough full-time contributors to Cranelift to develop and maintain backends for all of these ISAs. As I've described in comments in most of those listed issues, we estimate the effort to build a new backend at around 3 months of work / 20k lines of code. And we expect new backends to ideally have a fulltime maintainer available (i.e., not a one-time develop-and-dump prospect).

If not, what should I use for generating code for those architectures instead?

While this question is outside the scope of the Cranelift issue tracker, for "some other compiler" I'd recommend LLVM by default.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 17:07):

cfallin edited a comment on issue #11375:

How does Cranelift handle cross ABI compatibility?

We have a notion of calling convention in signatures; Cranelift supports a function that is compiled using one calling convention calling a function with another convention (and this is well-tested and used in practice in Wasmtime). So you should be able to define your external C functions using system_v (on Unix/Linux/macOS) or fastcall (on Windows) conventions and the calls should work fine. I'd encourage you to peruse our documentation for more.

On top of that, Cranelift does not support 32 bit architectures, are there any plan for that?

You can find all of our tracking issues for supporting new ISAs using the cranelift:new-target issue label: link. For example, arm32 in #1173 and x86-32 in #1980 are both 32-bit platforms.

The main issue is developer time: we don't have enough full-time contributors to Cranelift to develop and maintain backends for all of these ISAs. As I've described in comments in most of those listed issues, we estimate the effort to build a new backend at around 3 months of work / 20k lines of code. And we expect new backends to ideally have a fulltime maintainer available (i.e., not a one-time develop-and-dump prospect).

If not, what should I use for generating code for those architectures instead?

While this question is outside the scope of the Cranelift issue tracker, for "some other compiler" I'd recommend LLVM by default.


Last updated: Dec 06 2025 at 06:05 UTC