bytecodealliance / cranelift-jit-demo

JIT compiler and runtime for a toy language, using Cranelift
Apache License 2.0
649 stars 61 forks source link

Add an example of calling rust code from the jit #59

Open 0xekez opened 3 years ago

0xekez commented 3 years ago

For example, write a simple print function which can be called from compiled code to print a value.

jwpjrdev commented 2 years ago

How does the puts call work? I see an explanation but a link to some docs or something that explains this in further detail (what other functions are resolved, potential errors, etc.) would be nice.

Edit: my bad, I meant to post this under PR #60

Cy6er7um commented 2 years ago

I created some examples here #71.