r/WebAssemblyDev • u/Pool3pdx • Jan 11 '24
Very new to Development scene how Is W.assembly different than Assembly?
Hello r/WebAssemblyDev!
I am super new to the development scene and looking to find some basic answers regarding W.assembly:
(1) Is W.assembly the same as Assembly syntactically? --I am trying to find a decent IDE for writing/learning --Super kudos if anyone knows of an IDE on mobile platform/Linux to use
(2) I know that when looking into Assembly Cpu architecture will play a large role in the structure of my code; does this concept apply to W.assembly as well?
(3) IF W.assembly is different than Assembly, does anyone know an IDE that can function within both syntactic structures?
I know it feels like I might be asking for handouts, I am truly brand new--about 1/2 weeks into self-directed learning. No background in CS applicable
Thanks in advance~
2
u/jedisct1 Jan 11 '24
Hi!
WebAssembly resembles Assembly. It's a small set of opcodes, doing very simple operations. Instead of having the ".s" or ".asm" extension, WebAssembly source code usually has the ".wat" extension.
You can use Visual Studio Code which I think has an extension, or at least syntax highlight for WAT files.
But writing WebAssembly code directly is painful, as it requires using offsets and indices for everything.
So, usually, other programming languages are used to transparently generate WebAsssembly code.
Take a look at the .wat files in https://github.com/austintheriot/hand-crafted-wasm for examples of hand-written WebAssembly code.
But in order to use WebAssembly, you'd better use a higher-level language such as Zig or AssemblyScript.
1
u/[deleted] Jan 11 '24 edited Jan 11 '24
[removed] — view removed comment