| Crates.io | felfel |
| lib.rs | felfel |
| version | 0.1.1 |
| created_at | 2020-11-09 20:57:20.886445+00 |
| updated_at | 2020-11-09 21:39:36.990733+00 |
| description | A Rust library and CLI tool for Farsi compound noun generation. |
| homepage | |
| repository | https://github.com/mehdisadeghi/felfel |
| max_upload_size | |
| id | 310471 |
| size | 14,804 |
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.
felfel is available both as a library as well as a little CLI tool.
# Install it
$ cargo install felfel
# Use it in command line
$ felfel --> hopefully will make you smile
Add this to your Cargo.toml:
[dependencies]
felfel = 0.1
Then invoke the gen function:
use felfel;
fn main() {
println!(felfel::gen());
}
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.
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
felfel is distributed under MIT license.