Stream: cranelift

Topic: bindings


view this post on Zulip Carlo Kok (Apr 22 2020 at 09:19):

I googled but couldn't find it. are there bindings for Cranelift? (Looking mostly for wasm, x86_64, i386 and arm support); i'm looking to emit cranelift bitcode and turn it into object files.

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:19):

(ie as an alternative to replace say llvm)

view this post on Zulip Joey Gouly (Apr 22 2020 at 09:19):

C bindings?

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:20):

that would be the nicest for me. I saw the c bindings for wasm, but not looking to write /embed a runtime

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:21):

(But if it 's say c++ or anything else, I can just call whatever it has underneath, plain rust itself does'nt have a stable abi for me to call from my non rust compiler)

view this post on Zulip Joey Gouly (Apr 22 2020 at 09:21):

I don't believe there's C bindings to cranelift yet

view this post on Zulip Joey Gouly (Apr 22 2020 at 09:22):

(Also hi, I think you're ki9a, it's j`ey from the #llvm days)

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:22):

yes!

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:22):

cool

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:22):

:) I'm not looking to switch from llvm; but to use this as an alternative backend for when I want a faster build process.

view this post on Zulip Joey Gouly (Apr 22 2020 at 09:23):

Similar to what some people want to use cranelift w/ rustc for

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:23):

exactly. except rustc has the advantage that it's written in , well, rust

view this post on Zulip Carlo Kok (Apr 22 2020 at 09:24):

my rust is not good enough (read: haven't really used it at all) to start a process like this myself just yet

view this post on Zulip Carlo Kok (Apr 23 2020 at 18:29):

is there something like: https://github.com/bytecodealliance/simplejit-demo that doesn't jit but generates say .o files? or even links?

JIT compiler and runtime for a toy language, using Cranelift - bytecodealliance/simplejit-demo

view this post on Zulip Dan Gohman (Apr 23 2020 at 18:37):

https://github.com/bytecodealliance/simplejit-demo/tree/faerie

JIT compiler and runtime for a toy language, using Cranelift - bytecodealliance/simplejit-demo

view this post on Zulip Dan Gohman (Apr 23 2020 at 18:37):

Is a port of simplejit-demo to use the faerie backend to write a .o file

view this post on Zulip Carlo Kok (May 09 2020 at 12:12):

So as my first rust project; I was thinking of writing bindings like https://gist.github.com/carlokok/fbe07cf198064e9bf82734639be09261 (work in progress); would there be any interest in publishing this and/or contributing it ?

GitHub Gist: instantly share code, notes, and snippets.

view this post on Zulip Carlo Kok (May 09 2020 at 12:12):

(Obviously not until done & once it acutally works)

view this post on Zulip Carlo Kok (May 16 2020 at 05:49):

So this C code https://gist.github.com/carlokok/4419832f5d5371d0de52dc6c68f331e3 works now (contains result too)

GitHub Gist: instantly share code, notes, and snippets.

Last updated: Nov 22 2024 at 17:03 UTC