Originally, I was going to use D, but its current WASM guideline is buried under a lot of Discord threads, all while people are lazy to touch the wiki. I need to test stuff with WASM (use for scripting in applications, not browsers).

Please NO RUST!!! While I see why functional programming is useful (I even use wasmtime as my WASM engine, which is developed in Rust), but is horribly counterproductive for game development, especially if it’s opt out like in Rust.

EDIT: In the meanwhile, I’ve found AssemblyScript, which seems to be good for my usecase.

0 points

Late here, but if you want the easy route then there is always Unity (C#) if it fits for your use case in game dev and the license isn’t a problem for you.

permalink
report
reply
2 points

What are you building, it depends a bit on your usecase

Otherwise c# Blazor compiles to WASM

permalink
report
reply
3 points

Scala-js is working on it - as its compiler design may facilitate this.
I haven’t yet tried (on todo list) and am not an expert, but bookmarked in passing:
recent github implementation, some history, following older discussion

permalink
report
reply
1 point

Scala-js is becoming my go to scala backend. I did not know there was a wasm feature coming. Will try

permalink
report
parent
reply
6 points

I haven’t done too much work with WASM myself, but when I did, the only languages I saw recommended were Rust, C++, or TinyGo. From what I’ve heard, Rust and C++ are smoother than TinyGo. Garbage collected languages usually aren’t great choices for compiling to wasm because wasm doesn’t have any native garbage collection support. That limits your selection down a lot.

But another option you may want to consider is Nim. As I understand, it compiles to C, so any C->Wasm compiler should theoretically work for you as well. I did a quick search and wasn’t able to find any great resources on how to do this, but you might get a bit more lucky. Good luck!

permalink
report
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.4K

    Monthly active users

  • 754

    Posts

  • 5.9K

    Comments