0

I have been searching some way to compile AssemblyScript without node.js. I have not found it and it is a tragedy because I really could use it to dynamically generate some special web assembly from other programs, for example, from a PHP program, in environments where node is not supported (like many shared hostings). I have the intuition that the compiler does not actually require node at all, that it must be written in some other language, but I have not found any way to install the compiler at all.

Do you have any idea of how to use it without node?

algo
  • 108
  • 1
  • 11
  • It will be far easy to select a host that allows you to install apps and tools, then build the tools and maintain them. – John Hanley Nov 30 '22 at 00:01
  • Not if your are aiming to write an application that will work in most shared hostings, for the general public. – algo Jan 12 '23 at 20:45

1 Answers1

2

There is a way to do what you want, but it does not get rid of node completely.

The AssemblyScript README.md about the asc compiler lists two ways of building the compiler: the usual compilation to JavaScript, and a bootstrapping process, where you compile asc to WebAssembly by compiling it to JavaScript and then using that compiler to compile it to WebAssembly.

The caveat is that, at least initially, you still node to obtain the compiler from sources.

A second caveat is that the frontend for asc is JavaScript only, for now. You can use the WebAssembly binary only as a library, which may be actually what you want, given your use-case.

TachyonicBytes
  • 700
  • 1
  • 8