summaryrefslogtreecommitdiffstats
path: root/source/slang-stdlib/slang-embedded-stdlib.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-10-25 10:14:22 -0700
committerGitHub <noreply@github.com>2024-10-25 10:14:22 -0700
commit4bad669bbc5ec3ff77321f083c59cde87eb10229 (patch)
treebf0abc916692cf34e804469bba400f2b04172472 /source/slang-stdlib/slang-embedded-stdlib.cpp
parentef40d3044cf75ec3d7b24a43257fa744b45274f9 (diff)
Replace stdlib on Slang API with CoreModule (#5405)
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them. Following functions are renamed: compileStdLib() -> compileCoreModule() loadStdLib() -> loadCoreModule() saveStdLib() -> saveCoreModule() slang_createGlobalSessionWithoutStdLib() -> slang_createGlobalSessionWithoutCoreModule() slang_getEmbeddedStdLib() -> slang_getEmbeddedCoreModule() hasDeferredStdLib() -> hasDeferredCoreModule() Following command-line arguments are renamed: "-load-stdlib" -> "-load-core-module" "-save-stdlib" -> "-save-core-module" "-save-stdlib-bin-source" -> "-save-core-module-bin-source" "-compile-stdlib" -> "-compile-core-module"
Diffstat (limited to 'source/slang-stdlib/slang-embedded-stdlib.cpp')
-rw-r--r--source/slang-stdlib/slang-embedded-stdlib.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/slang-stdlib/slang-embedded-stdlib.cpp b/source/slang-stdlib/slang-embedded-stdlib.cpp
index 87107fa50..83e4a8c70 100644
--- a/source/slang-stdlib/slang-embedded-stdlib.cpp
+++ b/source/slang-stdlib/slang-embedded-stdlib.cpp
@@ -4,21 +4,21 @@
#ifdef SLANG_EMBED_STDLIB
-static const uint8_t g_stdLib[] =
+static const uint8_t g_coreModule[] =
{
# include "slang-stdlib-generated.h"
};
-static Slang::StaticBlob g_stdLibBlob((const void*)g_stdLib, sizeof(g_stdLib));
+static Slang::StaticBlob g_coreModuleBlob((const void*)g_coreModule, sizeof(g_coreModule));
-SLANG_API ISlangBlob* slang_getEmbeddedStdLib()
+SLANG_API ISlangBlob* slang_getEmbeddedCoreModule()
{
- return &g_stdLibBlob;
+ return &g_coreModuleBlob;
}
#else
-SLANG_API ISlangBlob* slang_getEmbeddedStdLib()
+SLANG_API ISlangBlob* slang_getEmbeddedCoreModule()
{
return nullptr;
}