Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro-core
Commits
ac79cef4
Commit
ac79cef4
authored
Jan 26, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve wasm build to cjs/esm
parent
3ad02226
Pipeline
#42724
passed with stages
in 4 minutes and 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
8 deletions
+35
-8
.gitlab-ci.yml
.gitlab-ci.yml
+11
-3
premake/dll.lua
premake/dll.lua
+24
-5
No files found.
.gitlab-ci.yml
View file @
ac79cef4
...
@@ -98,11 +98,18 @@ build_linux_x32:
...
@@ -98,11 +98,18 @@ build_linux_x32:
before_script
:
before_script
:
-
apt update; apt -y install gcc-multilib g++-multilib
-
apt update; apt -y install gcc-multilib g++-multilib
build_wasm
:
build_wasm
_cjs
:
extends
:
.build_unix
extends
:
.build_unix
variables
:
variables
:
PREMAKE_OS
:
emscripten
PREMAKE_OS
:
emscripten
BUILD_TYPE
:
wasm
BUILD_TYPE
:
wasm_cjs
image
:
git-registry.moenext.com/mycard/docker-ygopro-builder:debian12
build_wasm_esm
:
extends
:
.build_unix
variables
:
PREMAKE_OS
:
emscripten
BUILD_TYPE
:
wasm_esm
image
:
git-registry.moenext.com/mycard/docker-ygopro-builder:debian12
image
:
git-registry.moenext.com/mycard/docker-ygopro-builder:debian12
.build_windows
:
.build_windows
:
...
@@ -183,7 +190,8 @@ upload_to_minio:
...
@@ -183,7 +190,8 @@ upload_to_minio:
-
build_windows_x32
-
build_windows_x32
-
build_windows_x64
-
build_windows_x64
-
build_macos
-
build_macos
-
build_wasm
-
build_wasm_cjs
-
build_wasm_esm
tags
:
tags
:
-
linux
-
linux
script
:
script
:
...
...
premake/dll.lua
View file @
ac79cef4
...
@@ -33,7 +33,7 @@ workspace "ocgcoredll"
...
@@ -33,7 +33,7 @@ workspace "ocgcoredll"
language
"C++"
language
"C++"
cppdialect
"C++14"
cppdialect
"C++14"
configurations
{
"Release"
,
"Debug"
}
configurations
{
"Release"
,
"Debug"
}
platforms
{
"x64"
,
"x32"
,
"arm64"
,
"wasm"
}
platforms
{
"x64"
,
"x32"
,
"arm64"
,
"wasm
_cjs"
,
"wasm_esm
"
}
if
USE_LONGJMP
then
if
USE_LONGJMP
then
defines
{
"LUA_USE_LONGJMP"
}
defines
{
"LUA_USE_LONGJMP"
}
...
@@ -87,7 +87,7 @@ workspace "ocgcoredll"
...
@@ -87,7 +87,7 @@ workspace "ocgcoredll"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
end
end
filter
"platforms:wasm"
filter
"platforms:wasm
_cjs or platforms:wasm_esm
"
toolset
"emcc"
toolset
"emcc"
defines
{
"LUA_USE_C89"
}
defines
{
"LUA_USE_C89"
}
pic
"On"
pic
"On"
...
@@ -105,9 +105,28 @@ project "ocgcore"
...
@@ -105,9 +105,28 @@ project "ocgcore"
includedirs
{
LUA_DIR
..
"/src"
}
includedirs
{
LUA_DIR
..
"/src"
}
filter
"platforms:wasm"
filter
"platforms:wasm_cjs or platforms:wasm_esm"
targetextension
".wasm"
local
wasmLinkOptions
=
{
linkoptions
{
"-s MODULARIZE=1"
,
"-s EXPORT_NAME=\"
createOcgcore
\
""
,
"--no-entry"
,
"-s ENVIRONMENT=web,node"
,
"-s EXPORTED_RUNTIME_METHODS=[\"
ccall
\
",\"
cwrap
\
",\"
addFunction
\
",\"
removeFunction
\
"]"
,
"-s EXPORTED_FUNCTIONS=[\"
_malloc
\
",\"
_free
\
"]"
,
"-s ALLOW_TABLE_GROWTH=1"
,
"-s ALLOW_MEMORY_GROWTH=1"
,
"-o ../build/bin/wasm/Release/libocgcore.js"
}
"-s MODULARIZE=1"
,
"-s EXPORT_NAME=\"
createOcgcore
\
""
,
"--no-entry"
,
"-s ENVIRONMENT=web,worker,node"
,
"-s EXPORTED_RUNTIME_METHODS=[\"
ccall
\
",\"
cwrap
\
",\"
addFunction
\
",\"
removeFunction
\
"]"
,
"-s EXPORTED_FUNCTIONS=[\"
_malloc
\
",\"
_free
\
"]"
,
"-s ALLOW_TABLE_GROWTH=1"
,
"-s ALLOW_MEMORY_GROWTH=1"
,
}
linkoptions
(
wasmLinkOptions
)
filter
"platforms:wasm_esm"
-- Build as ES module
targetextension
".mjs"
linkoptions
{
"-s EXPORT_ES6=1"
}
filter
"platforms:wasm_cjs"
targetextension
".cjs"
filter
{}
if
not
WASM
and
SQLITE3_DIR
and
os
.
isdir
(
SQLITE3_DIR
)
then
if
not
WASM
and
SQLITE3_DIR
and
os
.
isdir
(
SQLITE3_DIR
)
then
project
"sqlite3"
project
"sqlite3"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment