
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
github.com/somenoe/raylib-hot-reload-go
A proof of concept of using hot reload with the raylib library in Go.
This project demonstrates a hot-reloading mechanism for game development in Go, leveraging Raylib for graphics and Yaegi for dynamic code interpretation. This setup allows for rapid iteration by applying code changes without recompiling or restarting the application.
Before running this project, ensure you have the following installed:
Go: Make sure you have Go installed and configured correctly. This includes having a working Go environment with either GOPATH
set up or Go modules enabled. (otherwise, yaegi extract
will fail)
Yaegi: Install Yaegi using the following command:
go install github.com/traefik/yaegi/cmd/yaegi@latest
To enable Yaegi to interact with Raylib, you need to extract the necessary symbols. Follow these steps:
Navigate to the symbols
directory:
cd symbols
Run the Yaegi extraction command:
yaegi extract github.com/gen2brain/raylib-go/raylib
Clone the repository.
Navigate to the project directory.
Run the main application:
go run .
Modify the src/game.go
file while the application is running. Changes will be applied dynamically.
main.go
: The main application file that sets up the Raylib window, the Yaegi interpreter, and the file watcher.src/game.go
: Contains the game logic that is dynamically reloaded.symbols/
: Contains the extracted Raylib symbols.This project was inspired by Gandalf-Le-Dev/ebitengine-yaegi-hotreload, which demonstrates a similar hot-reloading approach for the Ebitengine game library.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.