felfel 0.1.1

A Rust library and CLI tool for Farsi compound noun generation.
Documentation
  • Coverage
  • 33.33%
    1 out of 3 items documented1 out of 2 items with examples
  • Size
  • Source code size: 14.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 130.8 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 20s Average build duration of successful builds.
  • all releases: 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mehdisadeghi/felfel
    7 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mehdisadeghi

felfel

A Rust library and CLI tool for Farsi compound noun generation.

This is a little piece of code that generates a compound names in Farsi. Useful for naming things or anonymous visitors, or perhaps just for fun.

Usage

felfel is available both as a library as well as a little CLI tool.

Use as a CLI tool

# Install it
$ cargo install felfel

# Use it in command line
$ felfel --> hopefully will make you smile

Use as a library

Add this to your Cargo.toml:

[dependencies]
felfel = 0.1

Then invoke the gen function:

use felfel;

fn main() {
	println!(felfel::gen());
}

Use as a WebAssembly package

felfel is compiled to Wasm and published to npm as a JavaScript package. First add it to your package.json:

# Add it to your program
$ npm install felfel

Then invoke the gen function:

import * as felfel from "felfel";
console.log(felfel.gen());

You can also use the output of wasm-pack build --target no-modules and upload it somewhere.

Development

The only notable command worth mentioning is the generation of npm package:

# install wasm-pack
$ cargo install wasm-pack

# build the npm package
$ wasm-pack build --target nodejs

# publish the package
$ wasm-pack publish

License

felfel is distributed under MIT license.