Faraphel / Atlas-Install

A program to simplify the creation and installation of mario kart wii mods
https://faraphel.fr/mkwf/
Other
4 stars 2 forks source link

Experiment with a block or a node system to replace the older "safe_eval" system #36

Open Faraphel opened 8 months ago

Faraphel commented 8 months ago

The project need to allow the mods creators to write their own logic describing how to patch a file. The current system use a subset of Python (named "safe_eval" in the project) that try to avoid as much dangerous instructions as possible, but might be flawed due to its nature. To avoid this issue, this system will be replaced either by a block system (similar to Scratch or Blocky), or a node system (similar to the one available in Blender), that would be way more beginner-friendly and would avoid many security risk for the users.

Faraphel commented 8 months ago

After some experimentation with a node system, it seem a bit incompatible with the idea of the project : some structure would be hard to represent like loop and condition, calling another function and some other control blocks that are essential to the project.

Another possibility would be to use the Lua programming language that can be sand-boxed to avoid issues, but is a bit too high level and require many additional functions to make it easy to use.

The best option would be to use the v8 Engine from google that allow running javascript in a sandbox (this is the engine used in chromium). It is heavily maintained and would allow for a tool like Blocky to make it more accessible.