From 80471601720e107f0914479f6097281d0840cf18 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:47:00 -0700 Subject: Rename a directory `source/slang-stdlib` to slang-core-module (#5417) The directory name of `source/slang-stdlib` is changed to `source/slang-core-module`. We will use the term "core module" instead of "standard library" from now on. --- .../slang-embedded-core-module.cpp | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 source/slang-core-module/slang-embedded-core-module.cpp (limited to 'source/slang-core-module/slang-embedded-core-module.cpp') diff --git a/source/slang-core-module/slang-embedded-core-module.cpp b/source/slang-core-module/slang-embedded-core-module.cpp new file mode 100644 index 000000000..ceebcb940 --- /dev/null +++ b/source/slang-core-module/slang-embedded-core-module.cpp @@ -0,0 +1,26 @@ +#include "../core/slang-basic.h" +#include "../core/slang-array-view.h" +#include "../core/slang-blob.h" + +#ifdef SLANG_EMBED_CORE_MODULE + +static const uint8_t g_coreModule[] = +{ +# include "slang-core-module-generated.h" +}; + +static Slang::StaticBlob g_coreModuleBlob((const void*)g_coreModule, sizeof(g_coreModule)); + +SLANG_API ISlangBlob* slang_getEmbeddedCoreModule() +{ + return &g_coreModuleBlob; +} + +#else + +SLANG_API ISlangBlob* slang_getEmbeddedCoreModule() +{ + return nullptr; +} + +#endif -- cgit v1.2.3