Modernize and fix the Emscripten build - #2849
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2849 +/- ##
==========================================
+ Coverage 92.05% 92.07% +0.01%
==========================================
Files 529 530 +1
Lines 45362 45395 +33
Branches 6208 6208
==========================================
+ Hits 41757 41796 +39
+ Misses 1759 1756 -3
+ Partials 1846 1843 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
hannahbast
pushed a commit
that referenced
this pull request
Jul 6, 2026
This is a subset of #2849 that increases the compatibility with `libc++` (the standard library of LLVM). In particular: * In `libc++`, `std::string_view::begin()` and `end()` do not return a `const char*` but a wrapped iterator type, so `.data()` has to be used wherever a raw `const char*` is required (for example, for `std::from_chars`). * `libc++` provides no `char_traits` for non-`char` types, so `std::basic_string_view<std::byte>` is replaced by a `span<std::byte>`. NOTE: This PR does not yet address all instances of this second issue; for the remaining ones there are several possible solutions (some uglier than others), which will be handled in a follow-up. NOTE: This change does not alter any behavior; it only replaces non-portable uses of the standard library by portable ones.
hannahbast
pushed a commit
that referenced
this pull request
Jul 6, 2026
This is a subset of #2849 that increases the compatibility with `libc++` (the standard library of LLVM). In particular: * In `libc++`, `std::string_view::begin()` and `end()` do not return a `const char*` but a wrapped iterator type, so `.data()` has to be used wherever a raw `const char*` is required (for example, for `std::from_chars`). * `libc++` provides no `char_traits` for non-`char` types, so `std::basic_string_view<std::byte>` is replaced by a `span<std::byte>`. NOTE: This PR does not yet address all instances of this second issue; for the remaining ones there are several possible solutions (some uglier than others), which will be handled in a follow-up. NOTE: This change does not alter any behavior; it only replaces non-portable uses of the standard library by portable ones.
RobinTF
marked this pull request as ready for review
July 7, 2026 23:51
joka921
requested changes
Jul 8, 2026
joka921
left a comment
Member
There was a problem hiding this comment.
In general nice, but i have some questions for clarification etc.
Overview
Conformance check passed ✅No test result changes. |
|
marvin7122
pushed a commit
to marvin7122/qlever
that referenced
this pull request
Jul 9, 2026
So far, the Emscripten (WASM) build of QLever used an outdated toolchain and had several problems at runtime (for example, exceptions did not work correctly, and `ICU` could not find its data). This PR modernizes the build and fixes these problems. In particular: 1. The `emsdk` is bumped from version 3.1.73 to 6.0.2 and is now installed directly instead of via the Conan Center recipe, which lags behind. The `CMake` toolchain and the build environment are wired up so that dependencies that build via autotools (`ICU` and `OpenSSL`) also use the Emscripten compiler. 2. Exception handling now consistently uses `-fwasm-exceptions` for both compiling and linking; previously, exceptions did not work correctly. 3. The `ICU` data is now embedded statically, which fixes a `U_FILE_ACCESS_ERROR` at runtime. 4. The new class `GenericCharTraits` provides `char_traits` for non-standard single-byte character types, which newer versions of `libc++` no longer provide implicitly. This completes the `char_traits` part of ad-freiburg#3001. 5. Tests that trigger bugs in the Emscripten toolchain (for example, `HttpTest`) are excluded from the WASM build; each exclusion has a comment that names the failing compiler component. 6. Several redundant compilation flags are removed, and the CI workflow is adjusted accordingly.
yarox-1
pushed a commit
to yarox-1/qlever
that referenced
this pull request
Aug 10, 2026
This is a subset of ad-freiburg#2849 that increases the compatibility with `libc++` (the standard library of LLVM). In particular: * In `libc++`, `std::string_view::begin()` and `end()` do not return a `const char*` but a wrapped iterator type, so `.data()` has to be used wherever a raw `const char*` is required (for example, for `std::from_chars`). * `libc++` provides no `char_traits` for non-`char` types, so `std::basic_string_view<std::byte>` is replaced by a `span<std::byte>`. NOTE: This PR does not yet address all instances of this second issue; for the remaining ones there are several possible solutions (some uglier than others), which will be handled in a follow-up. NOTE: This change does not alter any behavior; it only replaces non-portable uses of the standard library by portable ones.
yarox-1
pushed a commit
to yarox-1/qlever
that referenced
this pull request
Aug 10, 2026
So far, the Emscripten (WASM) build of QLever used an outdated toolchain and had several problems at runtime (for example, exceptions did not work correctly, and `ICU` could not find its data). This PR modernizes the build and fixes these problems. In particular: 1. The `emsdk` is bumped from version 3.1.73 to 6.0.2 and is now installed directly instead of via the Conan Center recipe, which lags behind. The `CMake` toolchain and the build environment are wired up so that dependencies that build via autotools (`ICU` and `OpenSSL`) also use the Emscripten compiler. 2. Exception handling now consistently uses `-fwasm-exceptions` for both compiling and linking; previously, exceptions did not work correctly. 3. The `ICU` data is now embedded statically, which fixes a `U_FILE_ACCESS_ERROR` at runtime. 4. The new class `GenericCharTraits` provides `char_traits` for non-standard single-byte character types, which newer versions of `libc++` no longer provide implicitly. This completes the `char_traits` part of ad-freiburg#3001. 5. Tests that trigger bugs in the Emscripten toolchain (for example, `HttpTest`) are excluded from the WASM build; each exclusion has a comment that names the failing compiler component. 6. Several redundant compilation flags are removed, and the CI workflow is adjusted accordingly.
yarox-1
pushed a commit
to yarox-1/qlever
that referenced
this pull request
Aug 11, 2026
This is a subset of ad-freiburg#2849 that increases the compatibility with `libc++` (the standard library of LLVM). In particular: * In `libc++`, `std::string_view::begin()` and `end()` do not return a `const char*` but a wrapped iterator type, so `.data()` has to be used wherever a raw `const char*` is required (for example, for `std::from_chars`). * `libc++` provides no `char_traits` for non-`char` types, so `std::basic_string_view<std::byte>` is replaced by a `span<std::byte>`. NOTE: This PR does not yet address all instances of this second issue; for the remaining ones there are several possible solutions (some uglier than others), which will be handled in a follow-up. NOTE: This change does not alter any behavior; it only replaces non-portable uses of the standard library by portable ones.
yarox-1
pushed a commit
to yarox-1/qlever
that referenced
this pull request
Aug 11, 2026
So far, the Emscripten (WASM) build of QLever used an outdated toolchain and had several problems at runtime (for example, exceptions did not work correctly, and `ICU` could not find its data). This PR modernizes the build and fixes these problems. In particular: 1. The `emsdk` is bumped from version 3.1.73 to 6.0.2 and is now installed directly instead of via the Conan Center recipe, which lags behind. The `CMake` toolchain and the build environment are wired up so that dependencies that build via autotools (`ICU` and `OpenSSL`) also use the Emscripten compiler. 2. Exception handling now consistently uses `-fwasm-exceptions` for both compiling and linking; previously, exceptions did not work correctly. 3. The `ICU` data is now embedded statically, which fixes a `U_FILE_ACCESS_ERROR` at runtime. 4. The new class `GenericCharTraits` provides `char_traits` for non-standard single-byte character types, which newer versions of `libc++` no longer provide implicitly. This completes the `char_traits` part of ad-freiburg#3001. 5. Tests that trigger bugs in the Emscripten toolchain (for example, `HttpTest`) are excluded from the WASM build; each exclusion has a comment that names the failing compiler component. 6. Several redundant compilation flags are removed, and the CI workflow is adjusted accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





So far, the Emscripten (WASM) build of QLever used an outdated toolchain and had several problems at runtime (for example, exceptions did not work correctly, and
ICUcould not find its data). This PR modernizes the build and fixes these problems. In particular:emsdkis bumped from version 3.1.73 to 6.0.2 and is now installed directly instead of via the Conan Center recipe, which lags behind. TheCMaketoolchain and the build environment are wired up so that dependencies that build via autotools (ICUandOpenSSL) also use the Emscripten compiler.-fwasm-exceptionsfor both compiling and linking; previously, exceptions did not work correctly.ICUdata is now embedded statically, which fixes aU_FILE_ACCESS_ERRORat runtime.GenericCharTraitsprovideschar_traitsfor non-standard single-byte character types, which newer versions oflibc++no longer provide implicitly. This completes thechar_traitspart of Change code to be more compatible withlibc++#3001.HttpTest) are excluded from the WASM build; each exclusion has a comment that names the failing compiler component.