Skip to content

knowsys/nemo-web

Repository files navigation

nemo-web

Interactive Web-Frontend for the Nemo Rule Engine/Reasoner.

This project uses:

  • Web assembly to execute the Nemo Rule Engine which is written in Rust
  • Web workers to perform heavy computation in the background (Nemo reasoning, Monaco editor)
  • File system API for downloading reasoning results

Development

After building the Nemo WASM library, start a development server:

# Copy nemo VSIX extension to the correct location
mkdir nemoVSIX
cp $PATH_TO_NEMO_VSIX/nemo-X.X.X.vsix nemoVSIX/nemo.vsix
# Copy nemo-wasm library to the correct location
cp -r $PATH_TO_NEMO_WASM/nemoWASMBundler ./nemoWASMBundler

npm install
npm run dev

Before committing changes:

npm run lint

Technologies used in this project

  • Programming language: TypeScript
  • Single page application framework: Vite
  • Rendering: React.js
  • State management: React.js and Redux
  • Code editor: Monaco Editor

Getting started

Useful starting points for hacking on the code:

Production build

After building the Nemo WASM library, create a production build in the dist folder that can be served by a static web server:

# Copy nemo VSIX extension to the correct location
mkdir nemoVSIX
cp $PATH_TO_NEMO_VSIX/nemo-X.X.X.vsix nemoVSIX/nemo.vsix
# Copy nemo-wasm library to the correct location
cp -r $PATH_TO_NEMO_WASM/nemoWASMBundler ./nemoWASMBundler

npm install
NODE_OPTIONS=--max_old_space_size=4096 npm run build

# for local preview of the production build
npm preview