14 releases

0.6.3 Mar 1, 2025
0.6.1 Dec 18, 2024
0.6.0 Aug 2, 2024
0.5.0 Apr 16, 2024
0.2.0 Mar 25, 2023

#154 in WebAssembly

Download history 23/week @ 2024-12-09 111/week @ 2024-12-16 2/week @ 2025-01-06 5/week @ 2025-02-10 5/week @ 2025-02-17 259/week @ 2025-02-24 57/week @ 2025-03-03

326 downloads per month

MIT/Apache

610KB
16K SLoC

Rust 14K SLoC // 0.0% comments TypeScript 2K SLoC // 0.0% comments JavaScript 115 SLoC // 0.2% comments

vertigo-cli

A packaging tool and server for vertigo library

crates.io Documentation MIT or Apache 2.0 licensed Dependency Status downloads

This package provides vertigo binary that allows to create, build, serve and watch vertigo-based projects.

Packaging steps performed during build command:

  1. Runs cargo build
  2. Gathers artifacts produced during the build and by vertigo / vertigo-macro libraries:
    • index.html
    • wasm_run.js
    • your_project.wasm
    • included static files
  3. Optimizes your .wasm file using wasm-opt
  4. Adds hashes to filenames[^hashes] (to bypass browser's cache)
  5. Places everything in the build dictionary

Installation

cargo install --force vertigo-cli

Example usage

Generate new project

vertigo new my_blog

Build the project

cd my_blog
vertigo build

Serve project

vertigo serve --host 0.0.0.0 --port 8000

Watch project

vertigo watch --disable-wasm-opt

[^hashes]: Except hashes for included static files - these are computed by vertigo-macro library

Error codes returned from vertigo-cli commands

1 Cant Open Workspace

2 Cant Parse Workspace

3 Cant Find Cdylib Member

4 Package Name Not Found

5 Build Failed

6 Build Prerequisites Failed

7 Watcher Error

8 Cant Add Watch Dir

9 Other Process Already Running

10 Cant Read Wasm Run From Statics

11 Cant Read Wasm Run Sourcemap From Statics

12 Cant Write To File

13 Cant Spawn Child Process

14 Couldnt Wait For Child Process

15 Watch Serve Failed

16 Watch Pipe Broken

17 New Project Dir Not Empty

18 New Project Cant Create Dir

19 New Project Cant Unpack Stub

20 New Project Can Create Cargo Toml

21 New Project Can Write To Cargo Toml

22 Serve Cant Find Http Base Path

23 Serve Cant Read Index File

24 Serve Cant Open Port

25 Serve Wasm Read Failed

26 Serve Wasm Compile Failed

27 Serve Path To Url Translation Failed

Dependencies

~35–50MB
~842K SLoC