-
Notifications
You must be signed in to change notification settings - Fork 28
Add C++ implementation overview documentation #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
stelaukin
left a comment
There was a problem hiding this 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.
|
|
||
| ## Introduction | ||
|
|
||
| This document gives overview of how in Splashkit Online, code is compiled and execuded. It describes how user-written C++ code flows from the browser editor to WebAssembly compilation and execution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Change first sentence to
This document gives an overview of how Splashkit Online compiles and executes code.to improve readability.
-- Removes double space betweenis compiled
-- Corrects spelling ofexecuted
|
|
||
| This document gives overview of how in Splashkit Online, code is compiled and execuded. It describes how user-written C++ code flows from the browser editor to WebAssembly compilation and execution. | ||
|
|
||
| Main purpse is to help new contributors understand that how the system integrates C++ capability without requiring in-depth compiler knowledge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor spelling/grammar changes:
The main purpose is to help new contributors understand how the system integrates C++ capabilities without requiring in-depth compiler knowledge.
| - Warn users about unsupported API usage | ||
|
|
||
| It communicates with Web Worker to make sure that main interface doesn't freeze during compilation. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revises grammar/spellling:
The **CXXCompiler** class manages the C++ compilation process. Its responsibilities include:
- Writing source files to the virtual filesystem
- Compiling each C++ file into object files
- Linking object files into final WebAssembly output
- Providing syntax checking and error reporting
- Warning users about unsupported API usage
It communicates with a Web Worker to ensure the main interface doesn't freeze during compilation.
| 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 WASM executable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either:
- **clang++.wasm**: Compiles C++ source into object files
- **wasm-ld.wasm**: Links object files into a final
OR
- **clang++.wasm** compiles C++ source into object files
- **wasm-ld.wasm** links object files into a final
| - **clang++.wasm** Compiles C++ source into object files | ||
| - **wasm-ld.wasm** Links object files into a final WASM executable | ||
|
|
||
| In order to maintain UI responsiveness, this occurs asynchronously. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider rephrasing:
This occurs asynchronously to maintain UI responsiveness.
|
|
||
| - Sandboxing for security | ||
| - Compatibility between platforms | ||
| - Execution in real time in a web setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's WASM or Wasm or wasm.
Last bullet point could be reived to - Real-time execution in web environments
|
|
||
| ## Error Handling and Output | ||
|
|
||
| Prior to being displayed to the user, compiler messages undergo processing and formatting. In order to emphasise certain lines and offer insightful terminal feedback, errors are analysed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider rephrasing:
During error handling, compiler messages are processed and formatted before being displayed to the user.
This is done to ensure key lines are emphasised and clear terminal feedback is provided through error analysis.
Description
This document provides an overview of how C++ support is implemented in Splashkit Online, including:
It will help new contributors understand structured and flow of C++ backend and supports future improvement tasks.
Fixes # (issue)
Type of change
How Has This Been Tested?
This change affects documentation only.
No code functionality was modified.
Testing Checklist
Checklist