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

Added emscripten support for the Nim's gen script #1086

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

Nazariglez
Copy link
Contributor

Related to floooh/sokol-nim#31

@floooh
Copy link
Owner

floooh commented Jul 28, 2024

Thanks for the PRs! I'm a bit busy atm with this Chrome WebGL2 regressions thingy (there goes the weekend lol), but I'll try to focus on those PRs some time next week.

@floooh
Copy link
Owner

floooh commented Jul 28, 2024

NOTE: the CI tests are expected to break because they don't have the changes in sokol-nim, don't worry about that.

@Nazariglez
Copy link
Contributor Author

Nazariglez commented Jul 28, 2024

There is not rush at all, thanks @floooh!

@floooh
Copy link
Owner

floooh commented Jul 30, 2024

...checking now whether the CI runs through with the changes in sokol-nim merged, this will take a little bit...

@floooh
Copy link
Owner

floooh commented Jul 30, 2024

...ok actually got a real error in the CI pipeline now:

sokol/gfx.nim(2032, 5) Error: expected: ':', but got: 'keyword when'

...I'll have a look locally...

@floooh
Copy link
Owner

floooh commented Jul 30, 2024

There's this difference between the generated version and sokol-nim:

diff --git a/src/sokol/gfx.nim b/src/sokol/gfx.nim
index bc8f184..b4758a0 100644
--- a/src/sokol/gfx.nim
+++ b/src/sokol/gfx.nim
@@ -2006,7 +2006,7 @@ when defined emscripten:
   const d3d11* = false
   const metal* = false
   const emscripten* = true
-elif defined gl:
+elif when defined gl:
   const gl*    = true
   const d3d11* = false
   const metal* = false

I guess that when shouldn't be there, I'll try to fix that locally.

floooh added a commit that referenced this pull request Jul 30, 2024
@floooh floooh merged commit 702e088 into floooh:master Jul 30, 2024
25 of 28 checks passed
@floooh
Copy link
Owner

floooh commented Jul 30, 2024

Ok, I did this minor fix and then merged: b073c61

I didn't actually try to build for Emscripten, only for native macOS.

I'll add a little blurb to the changelog next.

Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants