• dejected_warp_core@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    19 hours ago

    Rust […] could use a higher level scripting language, or integrate an existing one, I guess.

    One approach is to use more macros. These are still rooted in the core Rust language, so they give up none of the compile-time checks required for stability. The tradeoff is more complex debugging, as it’s tough to implement a macro without side effects and enough compile-time feedback that you’d expect from a DSL.

    Another is to, as you suggest, embed something. For example, Rust has Lua bindings. One could also turn things inside out and refactor the rust program (or large portions of it) as a Python module.