Skip to content

option to produce single-target binary crates #1675

@spernsteiner

Description

@spernsteiner

Currently, when c2rust-transpile is run with --binary main_cu, it generates a Cargo crate with two targets, a lib target and a bin target. It puts the main compilation unit main_cu in the bin target and puts all other compilation units in the lib target. This means there are two separate targets, both of which contain non-trivial code.

It would be convenient for CRISP if there was only one target to worry about. One option would be to put all compilation units into the bin target, and remove the lib target entirely. Another option would be to put all compilation units into the lib target, and have the bin target consist only of a trivial stub that calls lib::main().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions