是否可以连接 Lua 和 javascript? [英] Is it possible to connect Lua and javascript?

查看:23
本文介绍了是否可以连接 Lua 和 javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这个问题是否恰当,因为英语不是我的母语.是否可以将 lua 和 javascript 连接在一起?我还没有找到任何相关信息.

I'm not sure if the question is well-posed as english is not my mother tongue. Is it possible to connect lua and javascript together? I did not find anything about that yet.

或者是否有可能,例如在 html 文件中使用两种语言编写脚本,例如

Or is it possible e.g. in a html-file to script with both languages like

<html>
<head>
</head>
<body>
    <script></script>
    <?lsp 
    ?>
</body>
</html>

也许可以在这些语言之间共享信息?!

and maybe to share information between those languages?!

或者是否可以在 js 中使用 lua 或在 lua 中使用 js?喜欢

or ist it maybe possible to use lua in js or js in lua? like

<script><?lsp ?></script>
<?lsp 
<script></script>
?>

推荐答案

您有几个在前端使用 Lua 的选项(这可能是您想要连接的目标/用Lua替换JS):

You have a few options for Lua usage on the front-end (this is probably what you're aiming for as you'd like to connect/replace JS with Lua):

有一些有趣的 WASM 东西正在开发中,例如:

There is some interesting WASM stuff in the works, like:

对于后端,还有更多选择.最引人注目的可能是:

For back-end there are even more options. Most noticeable are probably:

我只列出了一些.有很多.

I've listed just a few. There is a lot.

这篇关于是否可以连接 Lua 和 javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆