elringus / bootsharp

Compile C# solution into single-file ES module with auto-generated JavaScript bindings and type definitions
https://sharp.elringus.com
MIT License
673 stars 36 forks source link

revamp with .net 8 #123

Closed elringus closed 11 months ago

elringus commented 1 year ago

Complete rewrite using improved .NET 8 WASM capabilities and new JavaScript interop.

Changed

Improved

Fixed

codecov[bot] commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (eb045ae) 100.00% compared to head (797655b) 100.00%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #123 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 49 43 -6 Lines 1537 1439 -98 Branches 157 234 +77 ========================================= - Hits 1537 1439 -98 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Aragas commented 1 year ago

Any ETA on the merge?

elringus commented 1 year ago

Any ETA on the merge?

Hopefully by the end of the year. Planned to finish before .NET 8 GA, but got distracted with a side hustle. Though, it's already fully functional: I've migrated my own projects and everything seem to be working fine. Here are the latest packages if you'd like to try it out: bootsharp.zip.

Aragas commented 1 year ago

Hopefully by the end of the year. Planned to finish before .NET 8 GA, but got distracted with a side hustle. Though, it's already fully functional: I've migrated my own projects and everything seem to be working fine. Here are the latest packages if you'd like to try it out: bootsharp.zip.

Thanks for the packages! I was able to test the generation, but I'm not sure if it generated the desired outcome. Basically, it generates bin\Debug\net8.0\browser-wasm\AppBundle, but using BootsharpPackageDirectory for a custom path where the end package should be copied seems not to work. Should the outcome be similar to what we had previously? The typescript declaration for the package and the wasm files?

elringus commented 1 year ago

Yes, it should be similar to how it's worked before. Check the samples: https://github.com/elringus/DotNetJS/tree/feat/revamp/Samples

Problemkurs commented 11 months ago

Many thanks for your effort. I'm amazed how you got this working as there is not much information available I found.

I have an issue when publishing a project with bootsharp: After sucessful compilation the process exists with error code "npx rollup bootsharp.js -o bootsharp.mjs -f es -g process,module --output.inlineDyn amicImports" + another message "Cannot find module 'node:process'". This happens when I build the samples (ex. Trimming ) as well as in my own projects I tried it with. Any idea what this might be?

elringus commented 11 months ago

@Problemkurs Make sure node v20 or later is in the system path. (https://nodejs.org)