Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 1.95 KB

README.md

File metadata and controls

77 lines (51 loc) · 1.95 KB

Echo lapp

This is a simple example of the Laplace application. It is a minimalistic local-first web-application that demonstrates how to use the Laplace platform to create and run lapps.

Prerequisites

To build this project, you need to have the following tools installed:

For installing these tools, execute the following commands:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

cargo install --force cargo-make wasm-bindgen-cli

In addition, you need to install the required toolchains and compilation targets:

rustup toolchain install stable nightly
rustup target add wasm32-unknown-unknown --toolchain stable
rustup target add wasm32-wasi --toolchain nightly

To run the application, you need to have laplace installed. If you don't have it, you can install it with the following command:

cargo install --git https://github.com/noogen-projects/laplace laplace_server

Optionally, for the client wasm hot-reloading, you also need to have a cargo-watch plugin installed:

cargo install cargo-watch

Building and running

  1. First, clone the project:
git clone https://github.com/noogen-projects/echo-lapp.git
cd echo-lapp
  1. Then, build the project with cargo-make:
cargo make all

Or for a debug build, use the following command:

cargo make -p debug all

The built lapp will appear in the directory target/dist/echo/.

  1. Finally, run the project with laplace_server:
laplace_server

And open the browser to http://127.0.0.1:8080/echo.

Optionally, for hot-reloading wasm-client, you can use the following command in the separate terminal:

cargo make watch