https://github.com/maxerbox/yew-trunk-web-worker-flowbite-tailwind-rust-wasm-example-app
Example project, rust wasm yew webworker, do transformations to a OFX SGML file
https://github.com/maxerbox/yew-trunk-web-worker-flowbite-tailwind-rust-wasm-example-app
flowbite ofx rust sgml wasm yew
Last synced: 7 months ago
JSON representation
Example project, rust wasm yew webworker, do transformations to a OFX SGML file
- Host: GitHub
- URL: https://github.com/maxerbox/yew-trunk-web-worker-flowbite-tailwind-rust-wasm-example-app
- Owner: maxerbox
- License: mit
- Created: 2022-12-13T23:24:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T18:09:10.000Z (over 1 year ago)
- Last Synced: 2024-11-29T20:56:00.689Z (about 1 year ago)
- Topics: flowbite, ofx, rust, sgml, wasm, yew
- Language: Rust
- Homepage: https://maxerbox.github.io/yew-trunk-web-worker-flowbite-tailwind-rust-wasm-example-app/
- Size: 2.15 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# LBP Transform : yew trunk flowbite tailwind rust wasm example app
This is a hobby project used to learn Rust and Yew.
Every month, I make a budget and list my expenses. My bank offers to export my
expenses as an [OFX file](https://en.wikipedia.org/wiki/Open_Financial_Exchange)
spec v1.6. This is a SGML file listing transactions.
Unfortunately, my bank exports the file in a strange way, with dates contained
in transaction names.
So what this application does is taking an ofx file, sending it to a web worker
and then applying transformations to extract the date and format it properly.
->Input
```xml
POS20221211-23.00PJXU11LC%F
ACHAT CB BRASSERIES DE 10.12.2022
```
Output->
```xml
POS20221210-23.00PJXU11LC%FACHAT CB BRASSERIES DE
```
## Usage
For a more thorough explanation of Trunk and its features, please head over to
the [repository][trunk].
### Installation
If you don't already have it installed, it's time to install Rust:
. The rest of this guide assumes a
typical Rust installation which contains both `rustup` and Cargo.
To compile Rust to WASM, we need to have the `wasm32-unknown-unknown` target
installed. If you don't already have it, install it with the following command:
```bash
rustup target add wasm32-unknown-unknown
```
Now that we have our basics covered, it's time to install the star of the show:
[Trunk]. Simply run the following command to install it:
```bash
cargo install trunk wasm-bindgen-cli
```
That's it, we're done!
### Running
```bash
trunk serve
```
Rebuilds the app whenever a change is detected and runs a local server to host
it.
There's also the `trunk watch` command which does the same thing but without
hosting it.
### Release
```bash
trunk build --release
```
This builds the app in release mode similar to `cargo build --release`. You can
also pass the `--release` flag to `trunk serve` if you need to get every last
drop of performance.
Unless overwritten, the output will be located in the `dist` directory.
### Update metadata
Update the `name`, `version`, `description` and `repository` fields in the
[Cargo.toml](Cargo.toml) file. The [index.html](index.html) file also contains a
`` tag that needs updating.
Finally, you should update this very `README` file to be about your app.
### License
MIT License Copyright (c) Simon Sassi