Thoughts about W2C2?

Online Status

W2C2 is a WebAssembly to C89 transpiler. It has been used to port WASI bytecode to old operating systems, including current Python and things written in Rust, to classic Mac, BeOS, Solaris and others.

I've only got a little time but would find the potential to be enormous if the WASI runtimes were written for AmigaOS. Current runtimes are POSIX based so IXEmul.library or more modern equivalents may be needed.

Any thoughts?

Online Status

As I understand it, Web Assembly has little use outside a modern browser, as the browser provides the whole environment.

Online Status

You misunderstand, Krashan. The WASI standard is used to define runtimes for use outside the browser.

WASI stands for WebAssembly System Interface. It's designed to use the WebAssembly bytecode to generate stand-alone or sandboxed binaries without needing a browser. The most common usage of WASI is with Wasmer or WasmTime to provide a NodeJS like environment on servers based on the WebAssembly sandbox. W2C2, on the other hand, disregards the sandbox and produces raw C code from the bytecode. Unlike WASM2C which comes with the WebAssembly Binary Toolkit (WABT), W2C2 produces C89 instead of the more modern dialects.

This allows modern programs to be exported to older systems like the BeBox, NeXT cube, and so on, using only portable POSIX C. My suspicion is that it can be exported to non-POSIX operating systems by using custom runtimes.

One particular application could be the Rust-based Git clone and other text-based utilities. Another example that comes with the W2C2 package is the current version of Python 3.11 which has never seen an Amiga port.

Online Status

I would not find it to be a good idea. Non native programs are rarely good, adds a huge abstraction layer. In my mind not worth it. Btw a native Amiga git client is in the works.

Online Status

So Git is being gotten, what about Python 3.11?

Online Status

no python as far as I know of.

Online Status

Btw a native Amiga git client is in the works.

Is it going to be git command, compatible with standard git syntax?

Online Status

We are getting a bit off topic, but it is going to be an "agit" command with a related syntax, however it is not going to implement all git features, options aand subcommands. Amigagit is intended to be enough that you can manage your project.
The syntax is similar enough that you will feel at home but not similar enough that you can call it from everywhere. The storage format on the other hand is compatible, so if your disk is shared you should be able to do some work from say windows side with real git. And from the amiga side with amigagit for all those daily tasks.
That is the plan anyway, but don't expect it to be release anytime soon.

Online Status

Sometimes the MorphOS version of Git messes up on case insensitivity as an IXEmul.library version based on WebAssembly runtimes would. Is that the main problem you are running into?

Online Status

I wouldn't say we are there yet. We are developing a git client from scratch. We use Amiga api for everything we can. So whenever we open a file amigaos will make sure it is case insensitive. When on the other hand we try to find a specific file in the repository we are supposed to look in a case insensitive way. Obviously ithis is only a problem if the repository comes from somewhere else, but as I said we are not there yet. Developing git from scratch is a big undertaking.

Btw Amiga Git is not part of AmigaOS. I'm just involved in the project, and it will possibly become opensource one day.

Online Status

Sweet!