x3haloed / superstring-net-standard Goto Github PK
View Code? Open in Web Editor NEWThis project forked from atom/superstring
Native core components for Atom, ported to .NET Standard
License: MIT License
This project forked from atom/superstring
Native core components for Atom, ported to .NET Standard
License: MIT License
I was able get the WASM module compiled with WASI via clang and LLVM, but when I try to execute a function, it fails or hangs.
Using dotnet-webassembly, attempting to execute the "MarkerIndex::generate_random_number" static method produces the following error: "System.InvalidProgramException: 'Common Language Runtime detected an invalid program.'"
See SuperstringSample.Program line 35. You can use the attached compiled WASM file.
Attempting to execute that same method via the browser results in the browser locking up w/ high CPU usage.
<html>
<body>
<script>
fetch('superstring.wasm').then(response => {
console.log('received wasm file');
return response.arrayBuffer();
}).then(bytes => {
console.log('converted to bytes')
return WebAssembly.instantiate(bytes, {imports: {}})
}).then(results => {
console.log('instantiated wasm file');
console.log(results.instance);
window.fib = results.instance.exports._ZN11MarkerIndex22generate_random_numberEv(1);
console.log('result: ' + window.fib);
});
</script>
</body>
</html>
Can anyone with more C++ and WASM experience help me understand what I've done wrong?
To see the steps I'm using to compile the WASM module, check out /script/build-browser-version.sh
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.