[SOLVED] Running WebAssembly from Windows 10 or * Linux
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
First off lets start off with facts. Java, last I checked, if you download the official JDK, can be run from Linux or windows, with "java helloWorld". That would run the Java bytecode program helloWorld.class, which is assumed to come from helloWorld.java.
From official sources, can you do that with web assembly? What command would it be, and would it be cross platform, the same?
I'm trying to find out so I can, in a way, "hook onto it". Nothing malicious.
Thanks! I'll read those links, and come back here if I don't understand them. I'm new to that concept and didn't know about those.
Quote:
Is WebAssembly still "a thing?" I thought it had pretty much died off from neglect.
Good question.
Actually, the first I heard of web assembly, and back before I was as experienced with things, especially programming, I was trying to solve some programming issues besides this question. I won't link it, but that was the first I heard of it. ...Had to stop myself from senseless rambling... LOL
So I'll read the docs now that I know about them. Thanks!
It still amazes and puzzles me that modern-day web technology is still based on languages that are interpreted from source-code ... and that attempts to improve the speed of JavaScript (why did the winner turn out to be JavaScript ...?) using esoteric things like "just-in-time compiling to machine code on the user side."
We abandoned Adobe Flash® and refused to integrate anything like it into browsers. Instead, we packed HTML (sic ...) full of esoteric graphics features. And now we are left with "JavaScript libraries" that are megabytes long. The "hideous complexity" of all of this makes utterly no engineering sense to me.
We abandoned Adobe Flash® and refused to integrate anything like it into browsers. Instead, we packed HTML (sic ...) full of esoteric graphics features. And now we are left with "JavaScript libraries" that are megabytes long. The "hideous complexity" of all of this makes utterly no engineering sense to me.
+1. I personally really liked the concept of Java Applets when they were introduced. Write once, run everywhere. A self contained application that was 'easy' to deploy. At my company at the time, was getting on the band wagon and it was working out very well ... except all of a sudden the customer IT people got involved and wouldn't allow Applets to run... Grrrr.... Security. But for us, the 'concept' was wonderful. No more installing applications to each machine, just pull up your browser and the application was 'loaded' automatically from one 'repository' site. Not dependent on HTML or anything as the browser was only there as a vehicle to load the self-contained applet. Wonderful... Then blocked it...they call it progress. <sigh> We also ran into IT again with security when email came along. Wonderful. Now we can zip up our program and send directly to the customer instead of fed-X'ing' a CD to them.... Reset. Not allowed to receive zip files.... Blocked again... We have the technology ... but can't use it! Of course we know it just went down-hill from there. Now I have to use Liquid Files at work to send stuff back and forth between customers. Yuck..... I digress.
As for WebAssemby, not quite as easy as one would think. There is a nice little book called 'The Art of WebAssembly' that will get you started though if you really want to dig into the language.
Quote:
, and would it be cross platform, the same?
I believe the answer here is yes. Use a program written in 'C'/'C++' for example and compile it to a WASM binary. Then run that in any browser on any platform. I believe that is the goal.
So, I couldn't find anything about running from the command line. Awhile back though, I saw what looks like an unofficial way. Just run the javascript produced by the c++ compiler for wasm. Run it from command line instead of putting it in the browser with HTML. I guess that's the only way to do it. So I guess, thread sovled.
Basically, I wanted to give it a fair chance and create a hook for it in my language I've almost got objects in. Looks like it's not going to happen.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.