Jolt是一款运行在可移植Scheme层上的自托管Clojure实现,其核心目标是在Scheme环境中完整呈现Clojure语义,从而彻底摆脱对JVM的依赖 1。该工具支持Chez和Gambit两种后端,其中Chez为原生后端,而Gambit则主要用于生成JavaScript代码 1。尽管底层架构发生改变,Jolt仍能确保大多数现有的Clojure代码无需修改即可直接运行 1。
为了实现与C语言的深度互操作,Jolt提供了defcfn机制,能够将任意C函数绑定并转换为普通的Clojure函数调用 1。借助jolt build构建工具,开发者可以将项目编译为包含静态链接C依赖的单独立二进制文件 1。在并发模型上,Jolt让future、agent、pmap以及core.async等关键组件直接运行在操作系统线程之上 1。此外,系统内置了不可变向量、链表以及HAMT映射/集合等核心数据结构 1。用户可通过Homebrew(命令为brew install jolt-lang/jolt/jolt)或curl脚本进行安装 1。
Jolt is a self-hosted implementation of the Clojure programming language that runs on top of a portable Scheme layer, eliminating the dependency on the Java Virtual Machine. 1 The system is designed to run most existing Clojure code without modification while providing native interoperability with C libraries through a defcfn macro, which converts C functions into standard Clojure callable entities. 1 By targeting Scheme semantics rather than the JVM, Jolt aims to offer a lighter runtime environment for Clojure developers. 1
The implementation supports multiple backend options, including Chez as a native target and Gambit for JavaScript environments. 1 Concurrency features such as futures, agents, parallel maps (pmap), and core.async are executed on operating system threads, leveraging core data structures like immutable vectors, linked lists, and HAMT-based maps and sets. 1 For deployment, the accompanying jolt build tool compiles projects into standalone executables with statically linked C dependencies. 1 Users can install Jolt via Homebrew using the command brew install jolt-lang/jolt/jolt or through a provided curl script. 1
评论
还没有评论,欢迎留下第一条。