Skip to content

feat(linux): use native code's module maps and CMake builds - #6204

Merged
triniwiz merged 1 commit into
feat/linuxfrom
feat/linux-native-modulemap-cmake
Nov 11, 2026
Merged

triniwiz merged 1 commit into
feat/linuxfrom
feat/linux-native-modulemap-cmake

Conversation

@triniwiz

Copy link
Copy Markdown
Member

Native code in App_Resources/Linux and plugins' platforms/linux, like iOS:

  • Module maps: a module.modulemap in src/ or include/ goes to the metadata generator as is. Its headers, modules and link libraries are what JS gets. Sources are built as the library its first link names (link "mason" → lib/libmason.so).
  • CMake: a CMakeLists.txt replaces the built-in compile. Its shared libraries are bundled in lib/, and the generator takes include paths and defines from compile_commands.json. The build folder survives between builds, so CMake stays incremental.

Without either, nothing changes: src/*.c + src/*.h still work with no config.

Testing: 7 new tests in test/services/linux-native-code.ts. End to end on Ubuntu 24.04 arm64 with real CMake and the generator: a CMake project with a module map, and a bare .c/.h, both called from JS through ns-linux.

A module.modulemap in src/ or include/ is passed to the generator as is;
sources are built as the library its first `link` names. A CMakeLists.txt
replaces the built-in compile: its shared libraries are bundled and the
generator takes its flags from compile_commands.json.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e8465611-cc7f-497c-b977-5f99a1fd52d6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@triniwiz
triniwiz merged commit 57978ff into feat/linux Nov 11, 2026
9 checks passed
@triniwiz
triniwiz deleted the feat/linux-native-modulemap-cmake branch November 11, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant