fortune is a program that displays a pseudorandom message from a database of quotations

Public Library0.2.0updated 3 years ago714.67 KB
COPY
wapm install syrusakbary/fortune

Need help using WAPM?

Get started here

Commands

fortune

Files

  • Readme.md

Modules

fortune

fortune is a program that displays a pseudorandom message from a database of quotations that first appeared in Version 7 Unix.[1][irrelevant citation] The most common version on modern systems is the BSD fortune, originally written by Ken Arnold.[2] Distributions of fortune are usually bundled with a collection of themed files, containing sayings like those found on fortune cookies (hence the name), quotations from famous people, jokes, or poetry.

You can install fortune with:

wapm install -g fortune

Running

fortune
Opportunity knocks, but doesn't always answer to its name.
    -- Mason Cooley

Print help

fortune -h
available commands:
	-h                        this screen right here.
	-o <short,medium,long>    output short,medium or long quotes only.

Building from Source

First, you will need the WASI target installed in your Rust system:

rustup target add wasm32-wasi

Once WASI is available, you can build the WebAssembly binary by yourself with:

cargo build --release --target wasm32-wasi

This will create a new file located at target/wasm32-wasi/release/fortune.wasm.

When the wasm file is created you can upload it to wapm or execute it with wasmer:

wapm publish
# OR
wasmer run target/wasm32-wasi/release/fortune.wasm

You can also build a native executable with

cargo build

<1klast week

Latest version

0.2.0

Latest updated

3 years ago

Unpackaged size

714.67 KB

Collaborators

  • syrusakbary avatarsyrusakbary

Run it in the browser