3 releases

0.1.3 Apr 17, 2022
0.1.2 Apr 14, 2022
0.1.1 Apr 14, 2022
0.1.0 Apr 14, 2022

#246 in Programming languages

37 downloads per month
Used in neptune-cli

MIT license

71K SLoC

C++ 48K SLoC // 0.1% comments C 8K SLoC // 0.2% comments Rust 5.5K SLoC // 0.0% comments JavaScript 3.5K SLoC // 0.1% comments Visual Studio Project 2.5K SLoC GNU Style Assembly 2K SLoC Ruby 328 SLoC // 0.1% comments Lua 285 SLoC // 0.0% comments Visual Studio Solution 241 SLoC Python 56 SLoC // 0.1% comments

Contains (Windows DLL, 56KB) mimalloc-redirect.dll, (Windows DLL, 40KB) mimalloc-redirect32.dll, (static library, 3KB) mimalloc-redirect.lib, (static library, 3KB) mimalloc-redirect32.lib

Neptune Lang

Neptune is a dynamically typed scripting language

Documentation crates.io Book


  1. Embeddability: It can be embedded in any rust application. Synchronous or asynchronous rust functions can be used by a neptune script.
  2. Performance: It performs better than most interpreted(JITless) scripting languages. See Benchmarks for a comparison with lua, nodejs and ruby.
  3. Security: It is impossible to do any kind of undefined behaviour(including integer overflow)
  4. Concurrency
    • It is trivial to write asynchronous code
    • An error in a task does not always terminate the whole application and can be handled gracefully.
    • There are no function colors.
  5. Small implementation


  • Iterators
  • String Interpolation
  • Modules
  • Optional semicolons
  • UTF-8 strings
  • and much more...

Getting Started

The CLI be installed by the command given below. You must have the rust compiler and a C++ compiler. The C++ compiler can be set using the CXX environment variable. Clang is recommended for best performance.

cargo install neptune-cli

At the moment the CLI has a few basic functions and a REPL. The REPL supports multiline entries and the following shortcuts.

Command Description
Ctrl-L Clear the screen
Ctrl-C Interrupt/Cancel editing
Ctrl-D Quit REPL
Up arrow Previous history entry
Down arrow Next history entry

To embed it in rust you can use the library from crates.io.


  • CLI - Standard library, external modules
  • Preemptiveness?
  • Buffer type


~77K SLoC