Skip to content

The *require* function does not work from the nested module #605

@ipavlenko

Description

@ipavlenko

I am trying to migrate my code to MLUA v0.11.0-beta.2 and It seems that the require function doesn't work from a sub-package.

Environment:

Ubuntu 22.04.5 LTS
cargo 1.87.0 (99624be96 2025-05-06)
rustc 1.87.0 (17067e9ac 2025-05-09)

Please see a minimal example here:

https://github.com/ipavlenko/example-luau/

You will get an error launching this code:

Image

This problem is related to the project structure rather than the code itself. The MLUA works fine when used from the top-level package. Unfortunately, this issue belongs not only to tests but also to my application, which has a hierarchical structure.

How can I configure MLUA to resolve this issue?

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