Skip to content

Link against libraries compiled by rustc #1092

@willcrichton

Description

@willcrichton

I'm experimenting with a project to use Rust as a scripting language for a Rust game engine. My goal is to compile the game engine (and stdlib) with rustc, then pass rustc-compiled data structures (eg Vec) directly to a JIT-compiled Rust script using Cranelift.

The specific issue I ran into: is it possible for Cranelift-compiled code to call rustc-compiled code? For example, I found that certain stdlib functions would segfault when called by Cranelift-compiled code due to (I believe) a violation of calling convention. I don't know how fundamental/unavoidable this issue is, so I wanted to double-check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.optimize-speedThe speed of the generated executable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions