Skip to content

ffi object file name and parameterized modules #1448

@weaversa

Description

@weaversa

Here we have a foreign definition in a parameterized module. We create an instantiation of that module and try to load it in cryptol. Cryptol looks for the foreign declaration using the name of the instantiated module rather than the parameterized module.

The test is here: https://github.com/weaversa/cryptol-ffi-tests

$ make
$ cryptol shatest_8.cry
┏━╸┏━┓╻ ╻┏━┓╺┳╸┏━┓╻
┃  ┣┳┛┗┳┛┣━┛ ┃ ┃ ┃┃
┗━╸╹┗╸ ╹ ╹   ╹ ┗━┛┗━╸
version 2.13.0.99 (7e2613a, modified)
https://cryptol.net  :? for help

Loading module Cryptol
Loading module shatest
Loading module shatest_8
[error] Failed to load foreign implementations for module shatest_8:
    Could not load foreign source for module located at cryptol-ffi-tests/shatest_8.cry:
        user error (dlopen: dlopen(cryptol-ffi-tests/shatest_8.dylib, 0x0002): tried: 'cryptol-ffi-tests/shatest_8.dylib' (no such file))
        user error (dlopen: dlopen(cryptol-ffi-tests/shatest_8.so, 0x0002): tried: 'cryptol-ffi-tests/shatest_8.so' (no such file))

Metadata

Metadata

Assignees

No one assigned

    Labels

    maybe-fixedMight be resolved, but this needs to be confirmed.parameterized modulesRelated to Cryptol's parameterized modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions