简体   繁体   English

没有 node.js 和 npm 有没有办法编译 AssemblyScript? 最好是我可以从另一个程序调用的独立编译器?

[英]Is there any way to compile AssemblyScript without node.js nor npm? Preferrably a standalone compiler that I could call from another program?

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).我一直在寻找一些方法来编译没有 node.js 的 AssemblyScript。我没有找到它,这是一个悲剧,因为我真的可以使用它从其他程序动态生成一些特殊的 web 程序集,例如,从 PHP 程序,在环境中不支持节点(如许多共享主机)。 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.我的直觉是编译器实际上根本不需要 node,它必须用其他语言编写,但我还没有找到任何安装编译器的方法。

Do you have any idea of how to use it without node?你知道如何在没有节点的情况下使用它吗?

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.关于asc编译器的 AssemblyScript README.md列出了两种构建编译器的方法:通常编译为 JavaScript,以及引导过程,在该过程中,您通过将asc编译为 JavaScript 然后使用该编译器将其编译为 WebAssembly 来将其编译为 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.第二个警告是asc的前端目前只有 JavaScript。 You can use the WebAssembly binary only as a library, which may be actually what you want, given your use-case.您只能将 WebAssembly 二进制文件用作库,根据您的用例,这实际上可能是您想要的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有一种方法可以从Node.js程序中调用exec(2)函数? - Is there a way to call an exec(2) function from a Node.js program? 有没有办法为 Node.js (npm) 应用程序创建快捷桌面? - Is there any way to create an shortcut desktop to a Node.js (npm) application? 如何编译/安装node.js(无法配置cxx编译器!)(Ubuntu)。 - How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu). 在项目中使用Node.js作为独立的LESS编译器? - Use Node.js as standalone LESS-compiler in project? 如何制作具有良好性能的自定义反向代理(最好是 Node.js 代理)? - How can I make a custom reverse-proxy (preferrably a Node.js one) with good performance? 无人参与安装node.js和npm,但不从源代码构建它 - Unattended install of node.js and npm, but without building it from source 有没有办法从浏览器将变量传递给node.js,而无需表单或输入标签? - is there any way to pass variables to node.js from browser without form or without input tag? 是否有任何类型的方法可以从 node.js 服务器中的 HTML 服务器的脚本中调用 function? - Is there any type of way to call a function inside a script in a HTML server from with node.js? 使用node.Js / Strongloop连接到OracleDb,而无需任何C ++编译器? 对于连接,我们真的需要每次都编译源代码吗? - Connect to OracleDb using node.Js/ Strongloop without any C++ compiler? For connection, do we really need to compile source code everytime? 在node.js中,是否有任何方法可以将一条数据从一条路由重定向到另一条路由? - Is there any way of redirecting from one route to another with data from first route to second in node.js?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM