Skip to content
Success

Changes

Summary

  1. Add Emscripten build support and JS callback logging backend (details)
Commit aa804e41b274d7b1f3fd939dff8f4c04e66225b0 by dtv.comp
Add Emscripten build support and JS callback logging backend

This change enables building libosmocore for sandboxed, non-POSIX environments such as WebAssembly targets produced via the Emscripten toolchain.

In such environments, common OS facilities assumed by existing build and platform detection logic are unavailable, which currently prevents libosmocore from being built without targeted, build-time adjustments.

As part of this groundwork, a minimal callback-based logging hook is introduced.
When building for Emscripten, this hook allows forwarding log messages to an external environment via a user-provided JS callback. For all other build targets, the hook resolves to a no-op implementation and does not affect existing logging behavior.

No new runtime behavior or protocol changes are introduced. All changes are limited to build-time and platform-specific paths and are only active when targeting Emscripten. Native builds and existing deployment scenarios remain unaffected.

Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
The file was modifiedsrc/core/stats_tcp.c
The file was modifiedsrc/core/osmo_io_internal.h
The file was modifiedsrc/core/netdev.c
The file was modifiedsrc/core/Makefile.am
The file was modifiedconfigure.ac
The file was modifiedsrc/vty/logging_vty.c
The file was modifiedsrc/core/tun.c
The file was modifiedsrc/core/socket.c
The file was modifiedinclude/osmocom/core/logging.h
The file was modifiedsrc/core/libosmocore.map
The file was addedsrc/core/logging_emscripten.c
The file was modifiedsrc/vty/Makefile.am
The file was addedsrc/vty/telnet_interface_dummy.c