Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.62 KB

File metadata and controls

36 lines (27 loc) · 1.62 KB

Building

Setup

  • Requires OpenGL 4.1 for the GUI version
  • Install Rust and cargo (required for wasmtime)
  • Install Nim version 2.2.0
  • Clone the repository

The AST language framework does not compile on the current main branch, I will continue work on this at some later point.

Compile errors

If you get a compile error, try building with --passC:-Wno-incompatible-pointer-types, e.g: nimble buildDesktop --passC:-Wno-incompatible-pointer-types -d:appBuildWasmtime --forceBuild --app:gui -D:forceLogToFile -D:enableGui=true

Desktop version

Using atlas

  • Run atlas install after cloning or pulling updates.
  • Delete nimble.paths in case it exists (gets generated by nimble setup)
  • Use nimble buildDesktop or nimble build to compile the desktop version of the editor.
  • The release builds are built with:
    • For the gui version: nimble buildDesktop --app:gui -D:forceLogToFile -D:enableGui=true -D:enableTerminal=false
    • For the terminal version: nimble buildDesktop --app:console -D:forceLogToFile -D:enableGui=false -D:enableTerminal=true

Compiling tree sitter grammars to wasm

  • Go into the tree-sitter repositories root directory
  • Make sure the cli is built
    • cargo build
  • Compile the desired language to wasm. The specified directory is the one containing the src folder which in turn contains the grammar.js
    • target/release/tree-sitter build-wasm ../dev/nimtreesitter/treesitter_nim/treesitter_nim/nim

Compiling plugins to wasm

Use this command to build a plugin (inside the plugins directory):

nim c -d:release --skipParentCfg --passL:\"-o plugin_name.m.wasm\" plugin_name.nim