do you know any small/portable programming languages that can directly generate wat/wasm without heavy tooling like llvm? i.e. something that could run on m68k
Conversation
Notices
-
minute (mntmn@mastodon.social)'s status on Wednesday, 12-Jun-2024 04:37:16 JST minute
-
minute (mntmn@mastodon.social)'s status on Wednesday, 12-Jun-2024 04:44:10 JST minute
i wonder how feasible it would be to just translate 68000 assembly to webassembly
-
Mark T. Tomczak (mark@mastodon.fixermark.com)'s status on Wednesday, 12-Jun-2024 04:45:49 JST Mark T. Tomczak
@mntmn It's a very interesting ask and I wish I could help.
I'm also extremely curious about the target application space, because in my head if I'm trying to generate wasm I'm already in a heavyweight space. Like... "I'm going to use the tiniest machine I can to compile this wasm so I can then run it in... Chrome? All three gigs of Chrome?"
-
minute (mntmn@mastodon.social)'s status on Wednesday, 12-Jun-2024 04:45:49 JST minute
@mark using WebAssembly Micro Runtime it can be run on stuff like ARM microcontrollers! running it on Zynq-7000 right now
-
Hisham (hisham_hm@mastodon.social)'s status on Wednesday, 12-Jun-2024 04:49:47 JST Hisham
@mntmn I haven't used it myself so I don't know if it is m68k-small, but: Guile Hoot perhaps?
-
minute (mntmn@mastodon.social)'s status on Wednesday, 12-Jun-2024 05:14:38 JST minute
@guenther which compiler? is there something like TCC targeting wasm?
-
guenther (guenther@chaos.social)'s status on Wednesday, 12-Jun-2024 05:14:39 JST guenther
@mntmn C?
-
Charlie Balogh (chainq@mastodon.social)'s status on Wednesday, 12-Jun-2024 05:30:45 JST Charlie Balogh
@mntmn Free Pascal has a webassembly target, mostly with our own tooling, IIRC. And it runs 68k hosted (Amiga/Linux), if needed.
WASM works very differently to any "regular/real CPU" assembly. It's a stack machine, which is mostly good for compilers with SSA or some sort of a binary tree internal representation. It's not even recommended that you write it by hand...
Calling it "assembly" was the biggest marketing stunt ever, IMO, to gain the cool factor... But this is a story for another day.
-
minute (mntmn@mastodon.social)'s status on Wednesday, 12-Jun-2024 05:32:34 JST minute
@chainq aha, that's awesome though and the first really useful answer to my question! so i can run freepascal on my a3000 and have it generate wasm?
-
Charlie Balogh (chainq@mastodon.social)'s status on Wednesday, 12-Jun-2024 05:44:55 JST Charlie Balogh
@mntmn In theory, yes. I never tried it, but I could... And fix it if it doesn't work. 😅 But in theory (with some caveats), on any platform which can host a native compiler - and Amiga is one of them -, can be used to run any sort of cross-compiler builds too. It won't be fast, but should be usable.
It all depends what kind of external tooling it needs. But I think we mostly did our own tooling, because external tools were too dependent on "what LLVM does".
OK, lets check. Now I'm curious. 😅
-
minute (mntmn@mastodon.social)'s status on Wednesday, 12-Jun-2024 06:58:22 JST minute
@f4grx sure, i can write another compiler, but i like to not repeat things that others might have already accomplished
-
F4GRX Sébastien (f4grx@chaos.social)'s status on Wednesday, 12-Jun-2024 06:58:23 JST F4GRX Sébastien
@mntmn here is all you need
https://compilers.iecc.com/crenshaw/
-