Home

Awesome

<img src="./logo/full.png" alt="lumo logo" title="lumo" align="right" width="150" height="150" />

Lumo

Backers on Open Collective Sponsors on Open Collective

Lumo is a standalone ClojureScript environment that runs on Node.js and the V8 JavaScript engine. It starts up instantaneously and provides out-of-the-box access to the entire Node.js ecosystem, including a ClojureScript REPL.

Lumo also provides a ClojureScript build API, making it possible to compile ClojureScript projects entirely without the JVM, thanks to the experimental JavaScript version of the Google Closure Compiler.

Read the announcement blog post and our pledge!

If you enjoy Lumo, consider backing or sponsoring the project on <a href="https://opencollective.com/lumo"> <img alt="Open Collective" width="140px" src="https://opencollective.com/public/images/opencollectivelogo.svg"> </a>

Build status

PlatformStatus
macOSCircleCI
LinuxBuild Status
WindowsBuild status

Contents

Installation

Via NPX

npx is a package runner that comes with node6+. You can try lumo "without install" with:

npx -p lumo-cljs lumo

Via NPM

$ npm install -g lumo-cljs

If you get a permission failure, try this:

$ npm install -g lumo-cljs --unsafe-perm

Note: the installed binary will be named lumo rather than lumo-cljs

Via Homebrew (macOS)

$ brew install lumo

Note: If you want to install a binary built from master, run brew install --HEAD lumo (at your own responsibility).

Docker

$ docker pull anmonteiro/lumo:latest
$ docker run -it anmonteiro/lumo

Manual

  1. Download the latest release.
  2. Move it to somewhere in your $PATH.

Using Lumo

Interactive ClojureScript REPL

Enter lumo at the command line to launch the ClojureScript REPL.

$ npm init -y && npm install express request request-promise
$ lumo
Lumo 1.10.1
ClojureScript 1.10.520
...
cljs.user=> (require 'express)
cljs.user=> (require '[request-promise :as rp])
cljs.user=> (def port 3000)
#'cljs.user/port
cljs.user=> (-> (express)
       #_=>     (.get "/" (fn [req res] (.send res "Hello Lumo")))
       #_=>     (.listen port))
#object[Server [object Object]]
cljs.user=> (-> (str "http://localhost:" port)
       #_=>     rp
       #_=>     (.then (fn [body] (println "\nReceived:" body)))
       #_=>     (.catch (fn [err] (println "\nOops:" (.-stack err)))))
#object[Promise [object Promise]]
Received: Hello Lumo

Check out lumo -h for usage instructions and supported command line options. Also, see the announcement blog post.

Compile ClojureScript

Lumo can compile ClojureScript code as of version 1.2.0. See the introductory blog post. It is still considered experimental, given the relatively new Google Closure Compiler port to JavaScript, but it aims to be at feature parity with the JVM ClojureScript compiler.

The build API mirrors the ClojureScript one. Please reference its Quick Start and the Compiler Options. You can basically just replace the namespace with lumo.build.api:

(require 'lumo.build.api)

(lumo.build.api/build "src" {:output-to "out/main.js"})

The following example also shows how to use multiple source folders.

(require '[lumo.build.api :as b])

(b/build
 (b/inputs "src1" "src2") ;; variadic
 {:output-to "out/main.js"})

Building

To build Lumo from source:

  1. Make sure you have installed Boot, Yarn and Node.js (version >= 8).
  2. At the root of the repository, run: boot release.
  3. The resulting binary can be found in build/lumo (or build\lumo.exe if you're on Windows).

Contributing

See CONTRIBUTING.md.

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

<a href="https://opencollective.com/lumo/backer/0/website" target="_blank"><img src="https://opencollective.com/lumo/backer/0/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/1/website" target="_blank"><img src="https://opencollective.com/lumo/backer/1/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/2/website" target="_blank"><img src="https://opencollective.com/lumo/backer/2/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/3/website" target="_blank"><img src="https://opencollective.com/lumo/backer/3/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/4/website" target="_blank"><img src="https://opencollective.com/lumo/backer/4/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/5/website" target="_blank"><img src="https://opencollective.com/lumo/backer/5/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/6/website" target="_blank"><img src="https://opencollective.com/lumo/backer/6/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/7/website" target="_blank"><img src="https://opencollective.com/lumo/backer/7/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/8/website" target="_blank"><img src="https://opencollective.com/lumo/backer/8/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/9/website" target="_blank"><img src="https://opencollective.com/lumo/backer/9/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/10/website" target="_blank"><img src="https://opencollective.com/lumo/backer/10/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/11/website" target="_blank"><img src="https://opencollective.com/lumo/backer/11/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/12/website" target="_blank"><img src="https://opencollective.com/lumo/backer/12/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/13/website" target="_blank"><img src="https://opencollective.com/lumo/backer/13/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/14/website" target="_blank"><img src="https://opencollective.com/lumo/backer/14/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/15/website" target="_blank"><img src="https://opencollective.com/lumo/backer/15/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/16/website" target="_blank"><img src="https://opencollective.com/lumo/backer/16/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/17/website" target="_blank"><img src="https://opencollective.com/lumo/backer/17/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/18/website" target="_blank"><img src="https://opencollective.com/lumo/backer/18/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/19/website" target="_blank"><img src="https://opencollective.com/lumo/backer/19/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/20/website" target="_blank"><img src="https://opencollective.com/lumo/backer/20/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/21/website" target="_blank"><img src="https://opencollective.com/lumo/backer/21/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/22/website" target="_blank"><img src="https://opencollective.com/lumo/backer/22/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/23/website" target="_blank"><img src="https://opencollective.com/lumo/backer/23/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/24/website" target="_blank"><img src="https://opencollective.com/lumo/backer/24/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/25/website" target="_blank"><img src="https://opencollective.com/lumo/backer/25/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/26/website" target="_blank"><img src="https://opencollective.com/lumo/backer/26/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/27/website" target="_blank"><img src="https://opencollective.com/lumo/backer/27/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/28/website" target="_blank"><img src="https://opencollective.com/lumo/backer/28/avatar.svg"></a> <a href="https://opencollective.com/lumo/backer/29/website" target="_blank"><img src="https://opencollective.com/lumo/backer/29/avatar.svg"></a>

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

<a href="https://opencollective.com/lumo/sponsor/0/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/1/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/2/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/3/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/4/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/5/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/6/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/7/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/8/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/9/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/10/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/10/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/11/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/11/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/12/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/12/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/13/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/13/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/14/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/14/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/15/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/15/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/16/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/16/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/17/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/17/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/18/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/18/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/19/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/19/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/20/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/20/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/21/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/21/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/22/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/22/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/23/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/23/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/24/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/24/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/25/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/25/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/26/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/26/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/27/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/27/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/28/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/28/avatar.svg"></a> <a href="https://opencollective.com/lumo/sponsor/29/website" target="_blank"><img src="https://opencollective.com/lumo/sponsor/29/avatar.svg"></a>

Copyright & License

Copyright © 2016-2017 António Nuno Monteiro

Distributed under the Eclipse Public License (see LICENSE).