Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is hot reload possible? #10

Open
longzhiri opened this issue May 27, 2024 · 1 comment
Open

is hot reload possible? #10

longzhiri opened this issue May 27, 2024 · 1 comment

Comments

@longzhiri
Copy link

longzhiri commented May 27, 2024

Hello! If I have a rather large script project, and I want to hot reload a single script file, just like reloading a module in Lua, is that possible?

@fwsGonzo
Copy link
Collaborator

fwsGonzo commented May 30, 2024

For example in this repository, if you change a single script file, only that file will be recompiled when you build. All my build scripts use incremental compilation. I also use ccache in order to reduce build times even further. The result is that the iteration speed is quite fast, despite having to build a program after each change.

I don't know if it can compete with a Lua hot-reload. But it would be possible to detect a source change and rebuild the RISC-V binary in the background with a simple shell script that uses inotify.
Example: https://gist.github.com/mpapi/4656389

As an example, Godot will use this on every resource: If the resource changes, reload it.
Initializing the VM with a new program is fast enough that it is nearly instant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants