-
Notifications
You must be signed in to change notification settings - Fork 20
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
Move from miniswig to Simple Squirrel (SuperTux fork) #66
Comments
What we have currently feels pretty simple to me, just add functions to an API file. What kind of changes would we need to do to use this, and how would the new workflow go? |
The changes we could make is to remove a lot of the functions within Additionally, we would also be able to remove a fair amount of compilation steps as it doesn't require generating build/bin/miniswig to parse the API (as its handled entirely via a shared/static library). Alongside this, simplesquirrel also lets programmers extend C++ classes from inside of squirrel. We aren't using this at the moment but it is something to keep in mind. |
I actually agree with tulip on this one. I hate dealing with Miniswig and SimpleSquirrel looks so much better.
I am very concerned about how something like SimpleSquirrel would work if we were to port Brux GDK to pure C, however, we're not doing that right now (at least I'm not), and it isn't really worth the effort either way.
(yes, I'm replying via email, and yes I'm still mad at GitHub)
- hexaheximal
…On Tuesday, April 16th, 2024 at 5:45 AM, Tulip ***@***.***> wrote:
> What we have currently feels pretty simple to me, just add functions to an API file. What kind of changes would we need to do to use this, and how would the new workflow go?
The changes we could make is to remove a lot of the functions within `rte/src/api` as they would no longer be required (due to them being basic wrapper functions for squirrel) and instead use `ssq::VM::addFunc` (or `ssq::VM::setConst` for constants).
Additionally, we would also be able to remove a fair of compilation steps as it doesn't require generating build/bin/miniswig to parse the API (as its handled entirely via a shared/static library).
We could probably cut down on a lot of C++ files in the long run.
Alongside this, simplesquirrel also lets programmers extend C++ classes from inside of squirrel. We aren't using this at the moment but it is something to keep in mind.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
I can try to implement this sometime, since I've gotten a good understanding of SimpleSquirrel from having implemented it into SuperTux. However, I'm not sure when I'll be able to do that. |
…tion The `simplesquirrel` library is a simple binding to Squirrel in C++11. It allows Brux to easily bind its API functions, each with a single line of code, removing the need for wrapper generation and the various inconveniences around it - everything is done from the code in "src/brux". Since there is no longer any wrapper generation, the "src/api" and "src/squirrel" directories have been deleted. Additionally, `simplesquirrel` also provides handy wrappers across all types of Squirrel objects and a lot of general functions, which have been utilized in some places here. Closes KelvinShadewing#66.
…tion The `simplesquirrel` library is a simple binding to Squirrel in C++11. It allows Brux to easily bind its API functions, each with a single line of code, removing the need for wrapper generation and the various inconveniences around it - everything is done from the code in "src/brux". Since there is no longer any wrapper generation, the "src/api" and "src/squirrel" directories have been deleted. Additionally, `simplesquirrel` also provides handy wrappers across all types of Squirrel objects and a lot of general functions, which have been utilized in some places here. Closes KelvinShadewing#66.
…tion The `simplesquirrel` library is a simple binding to Squirrel in C++11. It allows Brux to easily bind its API functions, each with a single line of code, removing the need for wrapper generation and the various inconveniences around it - everything is done from the code in "src/brux". Since there is no longer any wrapper generation, the "src/api" and "src/squirrel" directories have been deleted. Additionally, `simplesquirrel` also provides handy wrappers across all types of Squirrel objects and a lot of general functions, which have been utilized in some places here. Closes KelvinShadewing#66.
…tion (#71) Implement `simplesquirrel` library to replace Miniswig wrapper generation The `simplesquirrel` library is a simple binding to Squirrel in C++11. It allows Brux to easily bind its API functions, each with a single line of code, removing the need for wrapper generation and the various inconveniences around it - everything is done from the code in "src/brux". Since there is no longer any wrapper generation, the "src/api" and "src/squirrel" directories have been deleted. Additionally, `simplesquirrel` also provides handy wrappers across all types of Squirrel objects and a lot of general functions, which have been utilized in some places here. Closes #66. * Update simplesquirrel * GitHub workflows: Recursively fetch submodules Allows for fetching the required Squirrel submodule, contained in the simplesquirrel submodule. * Add simplesquirrel Squirrel include dir patch * Fix illegal token error with `std::min` and `std::max` * Fix Squirrel linking issue in `simplesquirrel` * Update `simplesquirrel` * Revert copyright header change Don't know why I did this.
@KelvinShadewing Now that #71 is merged, this can be closed. Not sure why GitHub didn't do it. |
I personally believe miniswig makes working with the brux codebase quite daunting and not at all a fun experience to work with.
Not too long ago, the SuperTux project hard forked SimpleSquirrel (along with also preparing to ditch miniswig in favour of simplesquirrel) and, imo, using SimpleSquirrel makes dealing with Squirrel a lot more understandable and easier while not having particularly many trade offs.
The text was updated successfully, but these errors were encountered: