Lumina – 一种为 JavaScript 和 WASM 设计的静态类型 Web 原生语言。
Lumina – a statically typed web-native language for JavaScript and WASM

原始链接: https://github.com/nyigoro/lumina-lang

Lumina 是一种新的、静态类型的编程语言,专为 Web 设计,兼具安全性和 Web 兼容性——你无需做出选择。它编译为 JavaScript 和 WebAssembly,允许开发者使用单一、一致的类型系统(具有 HM 类型推断和基于特质的多态性)构建响应式 UI、WebGPU 应用程序和 WASM 模块。 Lumina 提供了一个命令行界面 (CLI),用于检查、编译、运行和打包代码,以及一个 REPL 用于交互式开发。 还有一个带有语言服务器支持的 VS Code 扩展。 主要特性包括响应式 UI 运行时和实时浏览器演示。 文档涵盖了入门、功能、标准库、渲染和未来路线图。 Lumina 是开源的,采用 MIT 或 Apache-2.0 许可。 你可以通过 npm 全局安装它 (`npm install -g lumina-lang`)。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 Lumina – 一种为 JavaScript 和 WASM 设计的静态类型 Web 原生语言 (github.com/nyigoro) 6 分,light_ideas 1 小时前 | 隐藏 | 过去 | 收藏 | 2 条评论 帮助 light_ideas 1 小时前 [–] Lumina 是一种静态类型、Web 原生语言,可以编译为 JavaScript 和 WebAssembly。 它具有 HM 类型推断、代数类型、traits、响应式 UI 运行时、REPL、LSP 以及用 Lumina 本身编写的浏览器演示。当前的演示在没有 React 的情况下运行,并使用 Vite 插件直接为浏览器编译 .lm 文件。 GitHub: https://github.com/nyigoro/lumina-lang npm: https://www.npmjs.com/package/lumina-lang 我很希望收到关于语言设计、Web 原生方向和开发者体验的反馈。回复 Simon-curtis 5 分钟前 | 父评论 [–] 在示例页面上,字符串插值的示例是一个简单的函数示例。 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

CI npm License

Most languages make you choose: safety or the web. Lumina doesn't.

Lumina is a statically typed, web-native language with HM type inference, algebraic types, and trait-based polymorphism, compiled to JavaScript and WebAssembly. Build reactive UIs, WebGPU workloads, and WASM modules in the same language, with the same type system.

npm install -g lumina-lang

Create hello.lm:

fn main() -> void {
  print("Hello, Lumina!")
}

Run the basic workflow:

lumina check hello.lm
lumina compile hello.lm --target esm --out hello.js
node hello.js

Start the REPL:

Open the live browser demo

  • lumina CLI for check, compile, run, grammar, bundle, and REPL workflows
  • lumina repl with multiline input, history, and persistent declarations
  • JS and WASM targets
  • Reactive UI runtime and browser demo
  • lumina-lsp plus a VS Code extension
  • docs/GETTING_STARTED.md
  • docs/CAPABILITIES.md
  • docs/STDLIB.md
  • docs/RENDER.md
  • docs/WEB_NATIVE_ROADMAP.md
  • vscode-extension/
npm install
npm run build
npm run lint:check
npm test
  • CONTRIBUTING.md
  • SECURITY.md
  • SUPPORT.md
  • CHANGELOG.md

Licensed under either of:

  • MIT (LICENSE)
  • Apache-2.0 (LICENSE-APACHE)

at your option.

联系我们 contact @ memedata.com