CSharpWasm support JS side#120
Conversation
…sed workerEventProcessor
…de, update event handling for compile and run
|
|
|
||
| ### Running the Build and Copy Script | ||
|
|
||
| To build the project and copy the necessary files into the `Browser_IDE/CSharpWasm` directory, run the following shell script: |
There was a problem hiding this comment.
It is hard to tell what files I need to build the project, please can you add clarification for this step regarding the following:
- What files do I need to copy?
- Do I need any build tools (e.g. dotnet framework)?
There was a problem hiding this comment.
- You don’t need to copy the files manually here, as this process is automated by CSharpWasm/buildAndCopy.sh. See the command below.
./buildAndCopy.sh
- Regarding the build tools, you need to have .NET installed. You can find more information in the research findings document.
Note: We discussed in the last weekly meeting that all of these scripts and copy/paste steps will be added to a pipeline, so that everything is in place when the project is built.
Let me create a card to document all of this. 🙂
| splashkit/ | ||
| generated/ | ||
| __pycache__/ | ||
| _framework/ No newline at end of file |
There was a problem hiding this comment.
No, those are the actual libraries that allow compiling C# in the browser :)
| "applicationUrl": "https://localhost:7281;http://localhost:5178", | ||
| "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", |
There was a problem hiding this comment.
Would it be possible to get some documentation on these two lines and how they relate to the execution of C#?
There was a problem hiding this comment.
This is part of the boilerplate generated with the project. This template allows running a server with the C# part, but we don’t actually use that feature since we’re only compiling and generating the .dll files.
There was a problem hiding this comment.
By the way, the research document provides more detail. Check this section:
https://github.com/thoth-tech/SplashkitOnline/blob/main/Documentation/Research%20and%20Findings/splashkit-online-c-sharp-support-research.md#wasm-tools
There was a problem hiding this comment.
If you have time would it be possible to convert this to a python script so people who use windows can also install this. If there is no time please add a card to the planner board :)
There was a problem hiding this comment.
That’s a great catch! I’ll add a card for it. 😊
There was a problem hiding this comment.
There was a problem hiding this comment.
Oh, nice! Thank you for checking that out. Let me add it to the document I'm preparing. :)
Oliver-Quail
left a comment
There was a problem hiding this comment.
I approve this PR, good job Daniel
cameronhum
left a comment
There was a problem hiding this comment.
Other than that one broken change I suggested. This is very easy to understand with the documentation you put together and I was able to use the build script and test easily. This code does its functionality and I will be happy to approve it once that small change is adjusted.
Browser_IDE/projectInitializer.js
Outdated
|
|
||
| // Example 3: Print combination of explicit string and value of string variable | ||
| string hello = "Hello"; | ||
| SplashKit.WriteLine(hello + " World!\nDon't forget spaces between words when printing to the terminal!"); |
There was a problem hiding this comment.
the \n causes syntax errors on first new project load as its interpreted to be a newline in the code editor rather than '\n'. it may need to be escaped somehow so that it does the intended task
There was a problem hiding this comment.
Looking into it :)
cameronhum
left a comment
There was a problem hiding this comment.
The only issue I had with the pull request has now been resolved and I am happy to approve this to go onto next review. Thank You!


Description
This PR is a follow up of the #106 pull request.
This change modifies Browser_IDE/CSharpWasm/main.js to read methods from splashKitMethods.generated.js, which is generated by the splashkit-translator as introduced in PR #24. It also includes CSharpWasm/SplashKitBindings.Generated.cs, likewise generated by the translator.
Process to replace generated files
Note: Files were already added to this PR.