Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Compile to webassembly
- ScratchBrother123
- Scratcher
100+ posts
Compile to webassembly
Is it possibile to compile scratch projects to webassembly, or is anyone interested about it?
- applejuiceproduc
- Scratcher
1000+ posts
Compile to webassembly
It looks like using this you can convert JavaScript to web assembly, and you can convert scratch to JavaScript using turbo warp packager or leapord.Ja so it should work?
A signature
- davidtheplatform
- Scratcher
500+ posts
Compile to webassembly
Im working on a thing that does this it might be ready soon (but probably not) Is it possibile to compile scratch projects to webassembly, or is anyone interested about it?
Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
- ajskateboarder
- Scratcher
1000+ posts
Compile to webassembly
What benefits would you get out of compiling Scratch code to WebAssembly? Scratch uses WebGL 1.0 for the GUI, so you won't get much rendering performance by using WASM
- Pufferfish_Test
- Scratcher
500+ posts
Compile to webassembly
I'm currently working on this - see https://github.com/hyperquark/hyperquark
This is my signature, and appears below eeevvvveeerrrryyy post I write
Try out Ocular
Good evening. I am a gerbil. Are you a gerbil? I know I am. Gerbils are possibly the most important beings in the universe; they are super intelligent and they eat carrots so we don't have to.
If you are reading this, you're probably thinking one of 3 things:
- This dude's not a gerbil, he's a pufferfish/human/bison/whatever other organism/inanimate object you mistakenly believe I am.
- Why am I reading this????????
- I'm hungry
The second one is a valid question, and one that has no satisfactory answer other than that you're really ,really, really bored.
As for the 3rd one - so am I. You're not alone.
- davidtheplatform
- Scratcher
500+ posts
Compile to webassembly
It isn't an interpreter written in WASM, it converts Scratch code to native C++ code, which speeds up the actual code. What benefits would you get out of compiling Scratch code to WebAssembly? Scratch uses WebGL 1.0 for the GUI, so you won't get much rendering performance by using WASM
https://github.com/hyperquark/hyperquarkthere are now 5 things that compile scratch to C++/rust now I'm currently working on this - see
Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
- ajskateboarder
- Scratcher
1000+ posts
Compile to webassembly
I was talking to the OPIt isn't an interpreter written in WASM, it converts Scratch code to native C++ code, which speeds up the actual code. What benefits would you get out of compiling Scratch code to WebAssembly? Scratch uses WebGL 1.0 for the GUI, so you won't get much rendering performance by using WASM
- Pufferfish_Test
- Scratcher
500+ posts
Compile to webassembly
(#6)mine doesn't compile to rust but okhttps://github.com/hyperquark/hyperquarkthere are now 5 things that compile scratch to C++/rust now I'm currently working on this - see
(#4)things that I hope to get out pf using WASM:
What benefits would you get out of compiling Scratch code to WebAssembly? Scratch uses WebGL 1.0 for the GUI, so you won't get much rendering performance by using WASM
- if the types of variables can be statically determined then most operations should be a bit faster than in js
- if not but you can make a pretty good guess then you could utilise branch hinting (currently available in safari & chrome behind a flag) which would hopefully improve things
- if you've got clones doing the same thing as each other each tick SIMD may be usable (although probably not)
- most importantly, wasm's performance is fairly predictable across browsers, unlike js which tends to be slower in ff - so the largest performance increass would probably be seen in ff
also i'd assume that graphics wouldn't gain any performance boost from using wasm, webgl will almost certainly be faster - however of course there is overhead from wasm<–>js interop so using wasm could just make everything slower… but then again copying data to and from the gpu is already expensive
This is my signature, and appears below eeevvvveeerrrryyy post I write
Try out Ocular
Good evening. I am a gerbil. Are you a gerbil? I know I am. Gerbils are possibly the most important beings in the universe; they are super intelligent and they eat carrots so we don't have to.
If you are reading this, you're probably thinking one of 3 things:
- This dude's not a gerbil, he's a pufferfish/human/bison/whatever other organism/inanimate object you mistakenly believe I am.
- Why am I reading this????????
- I'm hungry
The second one is a valid question, and one that has no satisfactory answer other than that you're really ,really, really bored.
As for the 3rd one - so am I. You're not alone.
- Discussion Forums
- » Advanced Topics
- » Compile to webassembly