• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

rusthon/Rusthon: multi-lang transpiler, compiler frontend.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

rusthon/Rusthon

开源软件地址:

https://github.com/rusthon/Rusthon

开源编程语言:

Python 73.8%

开源软件介绍:

Build Status

Easily mix multiple languages, frontends, backends, compilers, and transpilers inside markdown files. Markdown is the container format for your multi-language application that can contain: server backend logic and config files, and frontend javascript with html and css, all in a single markdown file. Rusthon compiles the markdown into tar files for release, or runs it for testing.

The integrated Python transpiler targets multiple backend languages, like: JavaScript and C++. The JavaScript backend implements most of the dynamic and some builtin functions of Python. The C++ backend is less dynamic and uses an extended static type syntax based on Go, Rust and C++. The other backends are experimental.

Installing

If you want to stay in sync with the git-repo, use the install-dev.sh script instead of the Debian or Fedora package. note: install-dev.sh just creates a symbolic link transpile that points to the current location of rusthon.py.

cd
git clone https://github.com/rusthon/Rusthon.git
cd Rusthon
sudo ./install-dev.sh

Using transpile

To see all the command line options run transpile --help

cd myproject
transpile mymarkdown.md

Above will compile everything in mymarkdown.md:

  • if the markdown contains an html page, it will be opened with NW.js or your system default web browser.
  • if the markdown contains a javascript file, it will be run with nodejs
  • otherwise, if the markdown contains: C++, Rust, or Go code, it will be compiled, and the exe is run.

Getting Started Javascript

Transpile from Python to Javascript, with specialized syntax for static types, and using WebWorkers and other extensions to the Python language like mini-macros

Mini-macros help you make your code more readable, and hide ugly APIs like HTML DOM. note: you can use unicode for macro names.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap