Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rickycodes/card

npx business card built with rust targeting wasm
https://github.com/rickycodes/card

binary cli npx rustlang wasm

Last synced: 5 days ago
JSON representation

npx business card built with rust targeting wasm

Awesome Lists containing this project

README

        

## Goal

Write a CLI using rustlang targetting wasm so we can run on node and deploy with npx/npm

## Building

```
cargo build --target=wasm32-unknown-emscripten --release
```

This moves files into:
```
./target/wasm32-unknown-emscripten/release/
```
Copy generated `card.js` and `card.wasm` into the root so the [bin](bin.js) can read it:

```
mv ./target/wasm32-unknown-emscripten/release/card.* .
```

Done!

Once published the binary can be executed with npx:
```
npx rickycodes
```
Scripts are also discoverable in [package.json](package.json#L9)

## License

MIT