LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-17-2022, 12:01 AM   #1
des_a
Member
 
Registered: Sep 2006
Posts: 899
Blog Entries: 35

Rep: Reputation: 22
Running WebAssembly from Windows 10 or * Linux


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.
 
Old 12-17-2022, 08:36 AM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: Arch
Posts: 4,511
Blog Entries: 5

Rep: Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571Reputation: 1571
You are probably going to have to read the docs.

https://developer.mozilla.org/en-US/docs/WebAssembly
https://www.w3.org/community/webassembly/
https://www.w3.org/wasm/
https://webassembly.org/docs/faq/
https://www.webassembly.fr/en/
 
Old 12-17-2022, 09:21 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,101
Blog Entries: 4

Rep: Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662
Is WebAssembly still "a thing?" I thought it had pretty much died off from neglect.
 
Old 12-18-2022, 03:17 AM   #4
des_a
Member
 
Registered: Sep 2006
Posts: 899

Original Poster
Blog Entries: 35

Rep: Reputation: 22
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!
 
Old 12-19-2022, 10:18 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,101
Blog Entries: 4

Rep: Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662
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.
 
3 members found this post helpful.
Old 12-19-2022, 09:08 PM   #6
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 265

Rep: Reputation: 76
Quote:
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.

Last edited by rclark; 12-19-2022 at 09:18 PM.
 
Old 12-20-2022, 04:54 AM   #7
des_a
Member
 
Registered: Sep 2006
Posts: 899

Original Poster
Blog Entries: 35

Rep: Reputation: 22
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Foundation offers free WebAssembly online class LXer Syndicated Linux News 0 05-19-2021 10:48 PM
seeking effective linux distro for webassembly development, any comments suggestions? joecoc1916 Linux - Distributions 2 06-07-2017 06:35 AM
LXer: Google Chrome 57 Released with WebAssembly Support, 36 Security Fixes LXer Syndicated Linux News 0 03-10-2017 08:31 PM
LXer: Lots new in Firefox, including support for WebAssembly LXer Syndicated Linux News 0 03-07-2017 05:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration