Skip to content

Add dedicated SourceTarget to kdist #2777

@juliankuners

Description

@juliankuners

Currently, evm-semantics is built by building the KEVMTarget kdist target. This target depends on the plugin and also builds KEVM with the given plugin using the function kevm_kompile. Other projects that derive from KEVM such as kontrol and kontrol-node also build KEVM with additional k source files and another main k file and module. While these source files can be successfully added to kompile args, these source files are not tracked by the manifest that uses the Target method source. Additionally, a requirement by pyk is that all referenced source files in the method source must be available in the python module. That means that one cannot inherit from KEVM to override source and keep all referenced files in tact. At the same time, a source target dependency cannot be injected into KEVMTarget, because dependencies are returned by the Target method deps. This is why kontrol and kontrol-node builds always generate the same hash in the kdist cache. In oder to successfully build kontrol or kontrol-node, kdist must be cleaned prior to building. This causes kdist to always unnecessarily rebuild the KEVM plugin, which is slow.

To fix this, the SourceTarget pattern used in web assembly and risc-v semantics repositories can be used. This can be first implemented in evm-semantics and afterwards adapted in kontrol and kontrol-node respectively.

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