Skip to content

Add initial bsp/web scaffold for the experimental Emscripten target#138

Draft
Copilot wants to merge 6 commits into
masterfrom
copilot/complete-bsp-web
Draft

Add initial bsp/web scaffold for the experimental Emscripten target#138
Copilot wants to merge 6 commits into
masterfrom
copilot/complete-bsp-web

Conversation

Copilot AI commented May 17, 2026

Copy link
Copy Markdown
Contributor

This PR fills in the missing bsp/web BSP entrypoint so the repository has a dedicated Web target instead of only scattered Emscripten-related compatibility code under bsp/pc. The new scaffold establishes the Web BSP boundary and keeps unsupported browser-specific behavior intentionally minimal.

  • What this adds

    • Introduces a new bsp/web/ directory with the initial build/runtime scaffold
    • Defines a Web-specific BSP config via LUAT_BSP_WEB
    • Adds a minimal Web entrypoint and network stub to avoid inheriting PC POSIX socket initialization by accident
  • BSP structure

    • bsp/web/include/luat_conf_bsp.h
      • Adds the Web BSP identity and a minimal feature set focused on VM/VFS/runtime basics
    • bsp/web/src/main_mini.c
      • Creates a Web-specific startup path
      • Reuses the existing shared runtime pieces from bsp/pc
      • Wraps reused log init/deinit behind Web-named helpers
    • bsp/web/port/network/luat_network_adapter_web.c
      • Provides a no-op luat_network_init() placeholder for browser builds
  • Build entry

    • bsp/web/xmake.lua
      • Adds an initial xmake target for the Web BSP
      • Reuses the smallest viable subset of bsp/pc support code and core modules needed to boot the runtime
  • Docs

    • bsp/README.md
      • Registers web/ as a BSP target
    • bsp/web/README.md
      • Documents current scope and intended Emscripten usage

Example of the new Web-specific boundary:

#define LUAT_BSP_WEB 1

void luat_network_init(void) {
}
Original prompt

完成bsp/web

Created from Copilot CLI via the copilot delegate command.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Complete bsp/web implementation Add initial bsp/web scaffold for the experimental Emscripten target May 17, 2026
Copilot finished work on behalf of wendal May 17, 2026 07:41
Copilot AI requested a review from wendal May 17, 2026 07:41
@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants