laplace

所属分类:其他
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2023-10-14 21:46:45
上 传 者sh-1993
说明:  用于去中心化web的本地第一个web应用程序平台。,
(The local-first web-application platform for the decentralized web.,)

文件列表:
.rustfmt.toml (446, 2023-11-08)
.taplo.toml (552, 2023-11-08)
CHANGELOG.md (1215, 2023-11-08)
Cargo.lock (156526, 2023-11-08)
Cargo.toml (818, 2023-11-08)
LICENSE (1088, 2023-11-08)
Makefile.toml (6238, 2023-11-08)
config.toml (443, 2023-11-08)
doc/ (0, 2023-11-08)
doc/laplace_arch.jpg (85933, 2023-11-08)
doc/web_apps_arch.jpg (73234, 2023-11-08)
examples/ (0, 2023-11-08)
examples/chat/ (0, 2023-11-08)
examples/chat/client/ (0, 2023-11-08)
examples/chat/client/Cargo.toml (949, 2023-11-08)
examples/chat/client/src/ (0, 2023-11-08)
examples/chat/client/src/addresses.rs (4708, 2023-11-08)
examples/chat/client/src/main.rs (30781, 2023-11-08)
examples/chat/common/ (0, 2023-11-08)
examples/chat/common/Cargo.toml (378, 2023-11-08)
examples/chat/common/src/ (0, 2023-11-08)
examples/chat/common/src/lib.rs (885, 2023-11-08)
examples/chat/config.toml (633, 2023-11-08)
examples/chat/server/ (0, 2023-11-08)
examples/chat/server/Cargo.toml (493, 2023-11-08)
examples/chat/server/src/ (0, 2023-11-08)
examples/chat/server/src/lib.rs (4613, 2023-11-08)
examples/chat/static/ (0, 2023-11-08)
examples/chat/static/index.html (1017, 2023-11-08)
examples/chat/static/main.css (2218, 2023-11-08)
examples/echo/ (0, 2023-11-08)
examples/echo/client/ (0, 2023-11-08)
examples/echo/client/Cargo.toml (551, 2023-11-08)
examples/echo/client/src/ (0, 2023-11-08)
examples/echo/client/src/main.rs (4318, 2023-11-08)
examples/echo/config.toml (290, 2023-11-08)
examples/echo/server/ (0, 2023-11-08)
examples/echo/server/Cargo.toml (408, 2023-11-08)
... ...

# Laplace The local-first web-application platform for the decentralized web. Look at the traditional centralized web-applications architecture vs. the local-first web-applications architecture: ![traditional and local-first web-applications architecture](https://github.com/noogen-projects/laplace/blob/master/doc/web_apps_arch.jpg) The Laplace high-level architecture is shown in the diagram below: ![laplace architecture](https://github.com/noogen-projects/laplace/blob/master/doc/laplace_arch.jpg) ## Build Building Laplace requires the latest `stable` and `nightly` Rust toolchains, the `wasm32` targets and `cargo-make` and `wasm-bindgen` build tools. To install Rust and its toolchains/targets via [rustup](https://github.com/noogen-projects/laplace/blob/master/https://rustup.rs/), if it is not already installed, run: ```shell curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env rustup toolchain install stable nightly rustup target add wasm32-unknown-unknown --toolchain stable rustup target add wasm32-wasi --toolchain nightly ``` To install [cargo-make](https://github.com/noogen-projects/laplace/blob/master/https://github.com/sagiegurari/cargo-make) and [wasm-bindgen](https://github.com/noogen-projects/laplace/blob/master/https://github.com/rustwasm/wasm-bindgen), run: ```shell cargo install --force cargo-make wasm-bindgen-cli ``` To build Laplace and all examples, run: ```shell cargo make all ``` Or for a debug build, run: ```shell cargo make -p debug all ``` ## Run examples Run the Laplace server: ```shell cargo make run ``` Or for a debug build: ```shell cargo make -p debug run ``` Then visit [http://localhost:8080](https://github.com/noogen-projects/laplace/blob/master/http://localhost:8080). If you are running for the first time or the previous link did not work, then visit [http://localhost:8080/?access_token=24tpHRcbGKGYFGMYq66G3hfH8GQEYGTysXqiJyaCy9eR](https://github.com/noogen-projects/laplace/blob/master/http://localhost:8080/?access_token=24tpHRcbGKGYFGMYq66G3hfH8GQEYGTysXqiJyaCy9eR). You can change the default port, access token and other settings by editing `config.toml` file. ## Development notes To check the project, use the following command: ```shell script cargo make check ``` To run all tests, use the following command: ```shell script cargo make test ``` To check and perform formatting, use the following commands: ```shell script cargo make checkfmt cargo make fmt ``` To enable autoformatting for IntelliJ IDEA with the Rust plugin: 1. Open the `File -> Settings -> Languages & Frameworks -> Rust -> Rustfmt` 2. Check in the "Run rustfmt on Save" and "Use rustfmt instead of the built-in formatter" 3. Set the `+nightly` in the "Additional arguments" field To run clippy, use the following command: ```shell script cargo make clippy ```

近期下载者

相关文件


收藏者