bytecodealliance / bytecodealliance/cranelift-jit-demo

Ability to call JIT-compiled function without hard-coding function signature with mem::transmute

Open
#8 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
763
Forks
65
PR merge metrics
No merged PRs in 30d

Description

In the example provided, the function signature for the to-be compiled code-string must be known in advance in order to be able to call into the function properly.

https://github.com/CraneStation/simplejit-demo/blob/4b7b8099346d877fe559dd5b593b18344d62e30d/src/toy.rs#L47

Is it possible to make a call dynamically using an array of parameters instead of being required to `mem::transmute` to the correct function signature?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/toy.rs around line 47 and inspect how the JIT-compiled function is called through mem::transmute. Determine whether the demo has an existing runtime or calling interface for dynamically supplied parameters; the issue provides no tests or acceptance criteria, so completion would require defining and validating a supported dynamic-call design.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.