Leaning Technologies

LT

Leaning Technologies

The home of Cheerp, CheerpJ, and CheerpX. Chat about virtual machines, compilers, and WebAssembly!

Join

I've written a Linux manuscript and I'd like to host WebVM for the exercises.

Hello, I've written a Linux manuscript and I'd like to host WebVM in an environment for the exercises in the book. I plan to keep the environment free for anyone to use but customized with exercises so people can practice learning Linux while reading the book and if they want they can follow along with a Capture the Flag, for learning Linux. My reason for being here is to explore using WebVM before I start building the environment. My first question was if there is support, which it appears there is, next is there any licensing issue if I host it on my own domain and infrastructure, and would Learning Technologies be interested in a shout out in the book or some sort of relationship more than me using your product for my readers?...

I keep getting these errors when trying to run my Java app

I have compiled my Java code (including the dependencies) into a Jar file, which runs smoothly. However, when I try to use CheerpJ, I keep these errors.
No description

Tailscale networking not working.

Hello, I can't seem to get networking to work at all. Despite having an exit-node setup.
No description

Is WebVM faster on x86_64 hosts compared to arm64 MacOS hosts?

I am evaluating WebVM as a tool to sandbox a "playground" environment for a internal company compiler tool as it allows us the ability to run unmodified linux-x86 (does it support 64 bit binaries?) binaries which simplifies our execution environment as compared to compiling the compiler to WASM and writing JavaScript bindings. One concern I have is that the performance is quite poor - but I have only had the chance to evaluate it on an M1 MacBook Pro host so I am wondering if x86 translation is the cause of this poor performance? Is WebVM faster on an x86_64 host? If so, are there plans to add support for linux-arm64 virtualization so arm hosts can perform better?...

Esscapesrc infected with MacOS:Agent-AJQ [Trj]

Just tried to build the webvm on my local mac and got this warning. So it gets quarantined and not built.
No description

Commercial use help

Hi! Looking at licensing for commercial use and want to test it first but running into issues. Can you assist? Can provide the JNLP file in a DM.

Cheerp ELF execution failed

I always get [1:1] ELF execution failed [-2]: /opt/ibm/java/jre/bin/java error. Also with bash or ls with own custom ext2 image and with the debian_large_20230522_5044875331.ext2 or debian_mini_20230519_5022088024.ext2. Does anyone know what i am doing wrong? Or is there a way to get more debug logging?

CheerpJ issue returned

Hello, I have been trying to publish my game (currently on a Jar file) to an html page. I am not sure if there are some things that I am currently during wrong since I am unable to get my desired result. I attached the output (both on the UI and the terminal) as well as the code I currently have. It would be appreciated if I can fix this ASAP. Thanks!
No description

Trying webworker sample, no console output...

Entered the examples, tried running locally & on remote web server, web page loads, javascript loads, no console output...

Machine does not start completely: Unable to enter commands

Hello, I wanted to install cheerpx locally. I followed all the steps of the github but once deployed, the machine does not start. I have the interface but I can't enter commands. The "user@:~" never appears... I waited several hours but nothing happens. On the picture, it's already been running for 1 hour. How to do it? And forgive me for my English... I'm not an English speaker
No description

CheerpJ can't get my game onto a site

Hello, I tried to put my Java game (which is a jar file) into cheerpJ, and this is my code: ```<!doctype html> <html lang="en"> <head> <meta charset="utf-8" />...
No description

Experimenting with CheerpJ to revive Dusk GMUD game

Here's an opensource game server/client that I would love to see run in the browser again. I made a demo amount of game-play content but it's still not quite ready to be online. The Dusk application loaded and I tried to log in game but got this error. Error at keyPressed java.net.SocketException:Operation not permitted (Write failed) Here's the demo world server https://github.com/ZabinX/DuskRPG/tree/master/DuskFiles/Dusk47 start server like this java -cp . DuskServer Here's the DuskCheerpJ client experiment https://github.com/ZabinX/DuskRPG/tree/master/DuskFiles/Duskcheerpj...
No description

webvm local deployment issues

https://github.com/leaningtech/webvm When I follow the readme.md instructions I get a 403 on my nginx when I run sudo nginx -c $HOME/GITHUB/webvm/nginx.conf. What am I missing?...

Return std::string from cheerp::genericjs function

Got this working by peeking at the client::String definition, but would like to know if there is a cleaner alternative. Also, I don't quite get what is happening there. Is getLocal fully converted to JS? How is it able to manipulate a std::string? Thanks in advance :) ```cpp [[cheerp::genericjs]] std::string getLocal(const std::string& key) { std::string ret;...

hi there im interested in trying to somewhat integrate browsercraft to my website

im still quite new to to this can anyone help or tell me where to start
Solution:
@snakey man ok, you should be able to do
<iframe src="https://browsercraft.cheerpj.com/embed""></iframe>
<iframe src="https://browsercraft.cheerpj.com/embed""></iframe>
...

Sound format not supported?

I tried rerendering my sound to 16 bit with 44.1kHz sample rate but i still get this error and my whole program crashes (it works normaly outside of site):
java.lang.IllegalArgumentException: No line matching interface Clip supporting format PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian is supported.
java.lang.IllegalArgumentException: No line matching interface Clip supporting format PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian is supported.
Does anyone have any idea what could i do?...
Solution:
Sound in CheerpJ is completely unsupported right now, but we are working on this. Please provide a test case so that @Panini can consider it as part of this line of work.

Compatibility with the typeof, instanceof keywords

Is there any expected support for the mentioned keywords in the future? Currently it's not such a big deal when working with typeof as it can be easily polyfilled with inlining. While speaking of instanceof, I haven't seemed to find any intrinsics in the API (see below), which would allow me to pass the wanted types. I know it's not doable with just simple __asm__ as it's quite limited for this case
instanceof<client::Object>(object);
instanceof<client::Object>(object);
...

Need help with basic LWJGL 2.9.0 demo loading on CheerpJ

Hello, I am trying to get a very simple LWJGL 2.9.0 Demo working via CheerpJ, but am running into an error Error: window.lwjglCanvasElement is not set or is not a canvas. I've attached a picture of my project structure as well as the the error itself and some other relavent things. My desktop application is a NetBeans project using JDK 8. Here's the source code of the triangle that I found online: ```java package org.nemotech.opengl; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display;...
Solution:
1. add this HTML to the start of the document body
<canvas id="lwjgl" width="800" height"600"></canvas>
<canvas id="lwjgl" width="800" height"600"></canvas>
2. to the script, add the following line before the cheerpjRunMain call:...
No description
Next