• This repository has been archived on 04/Jun/2022
  • Stars
    star
    1,884
  • Rank 24,614 (Top 0.5 %)
  • Language
    Clojure
  • License
    Eclipse Public Li...
  • Created about 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fast, cross-platform, standalone ClojureScript environment

lumo logo

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 Open Collective

Build status

Platform Status
macOS CircleCI
Linux Build Status
Windows Build 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]

Sponsors

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

Copyright & License

Copyright © 2016-2017 António Nuno Monteiro

Distributed under the Eclipse Public License (see LICENSE).

More Repositories

1

ocaml-h2

An HTTP/2 implementation written in pure OCaml
OCaml
307
star
2

reason-graphql-fullstack

Fullstack Reason + GraphQL Todo List App
OCaml
248
star
3

aws-lambda-ocaml-runtime

An OCaml custom runtime for AWS Lambda
OCaml
201
star
4

piaf

Web library for OCaml with support for HTTP/1.X / HTTP/2
OCaml
170
star
5

archi

An OCaml library for managing the lifecycle of stateful components and their dependencies
OCaml
48
star
6

gluten

Reusable runtime library for network protocols
OCaml
44
star
7

om-next-fullstack

Fullstack application demoing Om Next server-side rendering.
Clojure
37
star
8

ocaml-quic

OCaml
31
star
9

bucklescript-monorepo

Example of a BuckleScript monorepo setup
Reason
31
star
10

github-stars-lambda-demo

OCaml
28
star
11

gh-feed-reader

OCaml
26
star
12

aemette

A batteries-included Leiningen template for Om
Clojure
24
star
13

dotfiles

Vim Script
23
star
14

now-static-bin

Run arbitrary executables in Now 2.0 Lambdas
Go
22
star
15

reason-graphql-experiment

Reason + GraphQL Fullstack (Native) experiment with Now 2.0
JavaScript
21
star
16

now-custom-runtime

ZEIT Now v2.0 builder for custom AWS Lambda runtimes
TypeScript
21
star
17

eio-ssl

OpenSSL bindings to OCaml EIO
OCaml
18
star
18

devcards-om-next

Devcards extension for writing fully reloadable Om Next cards
Clojure
16
star
19

ocaml-mongodb

OCaml
13
star
20

ocaml-subscriptions-transport-ws

Websocket protocol for exchanging GraphQL requests and responses
OCaml
12
star
21

snoopy-mode

Minor mode for number row unshifted character insertion in Emacs
Emacs Lisp
10
star
22

now-rust

Rust
10
star
23

youtube

Reason
9
star
24

graphql-sdl

OCaml
9
star
25

plomber

Component instrumentation for Om Next
Clojure
9
star
26

rekeys

Example ReasonML app to find JavaScript event keycodes.
OCaml
8
star
27

craftconf-demo

7
star
28

websocket-httpaf

OCaml
6
star
29

anmonteiro.github.io

💾 sources for my blog
Clojure
6
star
30

reason-lwt-tutorial

OCaml
6
star
31

ocaml-cpuinfo

OCaml
5
star
32

cra-reason-template

JavaScript
5
star
33

caqti-eio

OCaml
5
star
34

deathrow

🔫 Random last statements by executed offenders - web client
Clojure
4
star
35

M101JS

MongoDB University MongoDB for Node.js Developers course
JavaScript
4
star
36

melange-relay

Use Relay with ReScript.
OCaml
4
star
37

nixerve

OCaml
3
star
38

nowtop

OCaml
3
star
39

js-modules-demo

JS Modules demo with Om Next
Clojure
3
star
40

netlify-staging-example

JavaScript
3
star
41

stdlib-merge

OCaml
2
star
42

kubernetes-nixos

Nix
2
star
43

chital

🐂 Scrape web pages for groups of articles
JavaScript
2
star
44

talks

Clojure
2
star
45

clj-isitup

💺 isitup.org client, from your code or command line
Clojure
2
star
46

ocaml-sendfile

OCaml
1
star
47

AroundTheCorneriOS

Swift
1
star
48

diy-lisp

my implementation of diy-lisp (from kvalle/diy-lisp)
Python
1
star
49

lumo-demo

Clojure
1
star
50

next-netlify-starter-2

JavaScript
1
star
51

dune-repro

Nix
1
star
52

netlify-graph-nextjs-example

JavaScript
1
star
53

next-netlify-starter-demo

JavaScript
1
star
54

kpop-stack

TypeScript
1
star