Skip to content

Make Melon.js a compiler plugin #1109

@L1lith

Description

@L1lith

I wonder how much compiler optimization we could do under the hood. It could also increase performance in cross-platform environments. For example all Melon.js API calls are an abstraction over the native APIs, so we could write our library for melon.js, and then at compile time we could remove the melon.js library all together from their code and replace their function calls with native API functions for better performance.

This would also be cool because we could compile for other targets more easily like console or mobile without any performance penalties besides the JS runtime itself (meaning no melon library to load and no bridge needed at runtime between the melon JS internals and the native APIs)

This does sound like it could be a lot of work but I think it would be a super nifty feature if anyone feels like figuring out how to do this. I'm currently doing research on doing this on one of my libraries so I might write an update on what I've learned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions