Skip to content

Add C++ implementation overview documentation#139

Open
rabail-aamir wants to merge 2 commits intothoth-tech:mainfrom
rabail-aamir:cxx-doc-overview
Open

Add C++ implementation overview documentation#139
rabail-aamir wants to merge 2 commits intothoth-tech:mainfrom
rabail-aamir:cxx-doc-overview

Conversation

@rabail-aamir
Copy link
Copy Markdown
Contributor

Description

This document provides an overview of how C++ support is implemented in Splashkit Online, including:

  • Where C++ related components live in the repository
  • Role of the CXXCompiler
  • How Web Workers and the Clang backend work
  • How C++ is compiled to WebAssembly (WASM)
  • How browser runtime executes compiled programs
  • How error handling works

It will help new contributors understand structured and flow of C++ backend and supports future improvement tasks.

Fixes # (issue)

Type of change

  • [ ✔] Documentation (update or new)

How Has This Been Tested?

This change affects documentation only.
No code functionality was modified.

Testing Checklist

  • [✔ ] Tested in latest Chrome
  • [ ✔] Tested in latest Safari
  • [ ✔] Tested in latest Firefox

Checklist

  • [✔ ] My code follows the style guidelines of this project
  • [ ✔] I have performed a self-review of my own code
  • [✔ ] I have commented my code in hard-to-understand areas
  • [✔ ] I have made corresponding changes to the documentation
  • [ ✔] My changes generate no new warnings
  • [ ✔] I have requested a review from ... on the Pull Request

Copy link
Copy Markdown

@stelaukin stelaukin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some suggestions about the phrasing of a few things and there are a couple of minor spelling and grammar issues.

In a Web Worker, the actual compilation process is carried out using:

- **clang++.wasm**: Compiles C++ source into object files
- **wasm-ld.wasm**: Links object files into a final
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence seems incomplete. It looks like it was intended to describe the final WebAssembly output. Consider completing the sentence for clarity.

## Relationship with WebAssembly (WASM)

SplashKit Online can securely run C++ code within the browser thanks to WebAssembly.
The browser's runtime interprets WASM, which is created by the compiler from C++.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is understandable, but the term “interprets” may be slightly misleading. Browsers typically execute or compile WebAssembly rather than interpret it. Consider rephrasing to something like “The browser executes the compiled WebAssembly (WASM) generated from C++ code” for better technical accuracy.

@Arnold-Seb
Copy link
Copy Markdown

Reviewed the PR and went through the documentation in detail. The content is well-structured and provides a clear overview of how C++ is implemented and executed in SplashKit Online. It should be helpful for new contributors to understand the overall flow.

I’ve left a few minor comments regarding small typos, wording improvements, and an incomplete sentence. These are minor and do not block approval.

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