Skip to content

Commit 8e14028

Browse files
committed
Make the bindings output file be {lib}_wasm.cpp instead of {lib}.cpp
1 parent 5546821 commit 8e14028

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

docs/ReleaseNotes/v0.4.2.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
* Fixed indentation within the generated prejs
77
* Removed excessive spacing when using many namespaces
88

9+
* Renamed the bindings file to "{library_name}_wasm.cpp" instead of "{library_name}.wasm"
10+
* Ex: MyCppLibrary.cpp -> MyCppLibrary_wasm.cpp
11+
* Note that this has little impact as this is handled internally by the CMake wrapper for Tolc

src/Embind/Proxy/moduleFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void ModuleFile::addModule(Module const& m) {
5252
}
5353

5454
std::filesystem::path ModuleFile::getCppFilepath() const {
55-
return m_libraryName + ".cpp";
55+
return m_libraryName + "_wasm.cpp";
5656
}
5757

5858
std::filesystem::path ModuleFile::getPreJSFilepath() const {

tests/Embind/Builders/moduleFileBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TEST_CASE("Contains the correct boilerplate", "[moduleFileBuilder]") {
2020
CAPTURE(path);
2121
CAPTURE(embind);
2222

23-
REQUIRE(path == "MyModule.cpp");
23+
REQUIRE(path == "MyModule_wasm.cpp");
2424

2525
for (auto const& expectedContains : {"#include <emscripten/bind.h>",
2626
"namespace em = emscripten;",

0 commit comments

Comments
 (0)