A notebook app integrated with todo lists utility. Developed with Rust, WebAssembly, Yew and Trunk.

Overview

Flow.er

A notebook app integrated with todo-list utility.

Project flow.er is a Rust WASM app running in browser. Taking advantage of Yew and Trunk, it provides good development experience.

Notice: this repo is under heavy development, and is currently not usable. To see the demo version, you can try flower-yew-lock branch, which is the last version of this software and is already usable, and follow the instructions below.

Try It!

Dev Install

This projects uses trunk as a Rust WASM application bundler.

First, install rust & cargo. Note that cargo is auto-installed if you follow the instructions.

Next, install trunk by the following (or just follow the instructions provided on the link)

$ cargo install --locked trunk
$ cargo install wasm-bindgen-cli

Maybe you will fail to compile on your first run with some error messages like:

[INFO]: Checking for the Wasm target...
Error: wasm32-unknown-unknown target not found!

Don't panic. Simply add

rustup target add wasm32-unknown-unknown

and everything will be fine.

Feel free to fire an issue if anything troubles you (❁´◡`❁)

Dev Serve

After following intructions above, you'll be able to serve the app locally.

First, clone / download this repo: https://github.com/LighghtEeloo/flow.er.git.

Then just switch to flow.er/flow_vase/flow_yew folder and run trunk serve. This will serve the app on 127.0.0.1:9720, which can be visited via your preferred browser.

The whole process will be like:

$ git clone https://github.com/LighghtEeloo/flow.er.git && cd flow.er/flow_vase/flow_yew
$ trunk serve

And then visit 127.0.0.1:9720 via your browser.

Supported Browsers

Chrome, Firefox and Edge are (roughly) tested and all seem to be working well.

However, only desktop versions are considered for now.

Disclaimer

This is a completely personal, non-profit project, mainly aiming at learning rust-lang, yew and the surrounding toolchains. I can try my best, but I won't be responsible for any of your potential data loss.

For now, this software isn't data-safe. Use at your own risk. This may get better as I develop, and you're welcomed to help improving it.

Todo

See todo.md.

Version

The final goal of this project is to create a notebook and mind-map app with is integrated with todo-list and calendar views.

It will be supporting patches to incrementally save your previous work, denoted by time-capsule function.

Project Technical Detail

Library Structure

The * directories are important ones.

.
├── flow_arena          * -- an implementation of "flow" data-structure
├── flow_vase           * -- user interface part
│   ├── flow_cli          -- (not implemented) a cli fallback 
│   ├── flow_iced         -- (deprecated) trying `iced`
│   └── flow_yew        * -- a `yew` GUI implementation
├── flow_vessel         * -- the "flow_core" part, with all the non-UI logic
└── src                   -- (not implemented) the skeleton of this package

Underlying Data Structure: Flow and Entity

"Flow" is the core data-structure implemented and used in this project. It's a superset of the classical "tree".


On hearing mindmaps, the intuitive representation would be "tree", or even better, "graph". However, Rust's strict borrow checker makes it hard and potentially unsafe to implement either of them. Moreover, trees are too powerless while the graphs are too complicated for the mindmap scenario.

A specific example would be: "I have a tree-like mindmap, good, but what if this node should belong to two parents?"

That's where "flow" jumps in. It features "arena" style storage and flexible relationship representation. The concept of "arena" was mentioned when the rust folks were torturing by the unsafe and difficult implementations.

A typical arena contains:

  1. A map / vec to store the data.
  2. A relationship recorder which only plays with the keys / indices.

In this way, the arena style basically replaces the annoying pointers with keys, which could be, for example, usize.Now all the operations are cheap and safe. The only trouble, however, is you have to generate the key by hand.

Flow's relationship model is then simple to understand:

  1. Each node has an id, a parent_id and a Vec of children_id.
  2. All the nodes are stored in a HashMap as (id, node).
  3. Nodes can be visited via id.
  4. A root node ensures that all the nodes are recrusively traceable.

And certain properties are defined:

  1. All ids presented must be valid.
  2. The root has no parent, while other nodes must have.
  3. A node's parent must have the node as a child.
  4. A node just memorizes the most recent parent.

We can see that flow is even capable of representing a graph; however, I think it's unnecessary to use it here.

Flow is implemented in flow_arena, as FlowArena.


As for Entity, it's the content of every node. Every entity has a (hopefully) unique id, EntityId. It can be generated by:

  1. The current time combining a u64 random number.
  2. Or just from a factory with its incremental counter.

Entity features the following functions:

  1. face: the name of the entity.
  2. bubble: a detailed description / note of the entity.
  3. symbol: whether it's...
    1. An ordered / unordered list entry.
    2. A todo-list entry.
    3. Plain.
  4. tags: a tag system.
  5. time-notes: whether it's calendar-visible, as a duration.

Entity is implemented in flow_vessel.

About Vessel, Glass, and Vase

Vessel is everything that needs to be stored. Suppose you close the app and reopen it, the only data left will be the data stored in Vessel. Though it has nothing to do with any specific UI, it does it's best to extract the common UI structure and logic, so that the different visits can share the most information. It impls Serialize and Deserialize and stores by json.

Glass handles a shared data structure for all UIs. It is stored within a vessel. It's a map of (Router, Cube), which should have been a struct fielded by the routers, but the map provides fancy reflect function and ... here we are. Cube is an abstract session structure; we'll cover it soon.

Vase implements the GUI part. In the yew version, Vase impls yew::Component. Unfortunately it's currently the only Component becuase I still have trouble handle the global data access and update, which are all over my code. In the short future, I'll try the functional approach.

Cube and CubeVM / CubeView

The Cube is a piece of UI session data stored by Glass; while CubeVM is the runtime UI session data created on-site. Though keeping them identical and updated is hard, it's even trickier how to abstract them to store and show polymorphism.

The data storage of, say, a bunch of differently typed structs which share the same trait, is always a headache. Two different approaches are adopted at the vessel and vase side, separately.

The vase side is straight forward: just use an enum CubeView to store the different parts, and together with it, store the common info in CubeVM (CubeViewModel / VirualMachine, whatever). This results in heavy glue codes, to manually map the different inputs to the enum patterns. However, it's still relatively easy to implement; and in fact, I think it's already the cheapest way to do without the help of macros.

As for vessel side, struct Cube is used; however, it's merely a struct containing a truck of Option<T>s and a TypeEnum, and can be turned into the corresponding Type. Each subtype just impls from and into, and the flexible convertion is done. However, if more fields are added in the future, the convertions must be updated.

At Last, About Storage

This project is currently using local storage to save cache, and supports downloading all progress / exporting to clipboard. One can import data back with source code mode. In the future, a local server or a cloud server will be served instead to guarantee data safety.

You might also like...
Code for my workshop
Code for my workshop "Production-ready WebAssembly with Rust" presented at RustLab 2023 in Florence

Workshop: Production-ready WebAssembly with Rust A workshop on Rust for WebAssembly by Alberto Schiabel (@jkomyno). 🤓 This workshop was first present

A 3D bin packing library in Rust/WebAssembly.

packme-wasm Demo https://packme.vercel.app This repository hosts an implementation of Dube, E., & Kanavathy L. (2006). Optimizing Three-Dimensional Bi

A rust library containing typings and utility functions dealing with the Public specification of the Internet Computer.

IC Types Contributing Please follow the guidelines in the CONTRIBUTING.md document. Goal This library contains typings and utility functions dealing w

NPM package distributing biscuit in WebAssembly for web components

Biscuit playground This is an example application for Biscuit tokens, where you can manipulate tokens and their verification in your browser. build wi

`wasm-snip` replaces a WebAssembly function's body with an `unreachable`

wasm-snip wasm-snip replaces a Wasm function's body with an unreachable instruction. API Docs | Contributing | Chat Built with 🦀 🕸 by The Rust and W

WebAssembly (Wasm) interpreter.

Continuous Integration Test Coverage Documentation Crates.io wasmi- WebAssembly (Wasm) Interpreter wasmi was conceived as a component of parity-ethere

Dependency solver for Elm, made in WebAssembly

Dependency solver for Elm, made in WebAssembly This repo holds a dependency solver for the elm ecosystem compiled to a WebAssembly module. The wasm mo

A simple code for checking crate 'prost' on WebAssembly (🦀 + 🕸️ = 💖)

rust-wasm-prost This repository is a simple code for checking crate 'prost' on WebAssembly ( 🦀 + 🕸️ = 💖 ). What is prost? prost is a Protocol Buffe

Version of Clue made to be compilable in WebAssembly (WIP)
Version of Clue made to be compilable in WebAssembly (WIP)

Clue is a programming language that compiles into Lua code with a syntax similar to languages like C or Rust. Clue tries to be almost as simple as Lua

Comments
  • Replace yew_services to yew::services

    Replace yew_services to yew::services

    In main.rs line 143, it is written yew_services. Please change it to yew::services. Also, comment out yew_services in cargo.toml and the path to yew should not be there. There just "" these are fine. With a path, it does not compile on linux and with your specific path, it would not compile on any other pc :) :+1: .

    good first issue 
    opened by m-s-h-1 3
  • Cannot serve the app following the instructions

    Cannot serve the app following the instructions

    Hi, this looks like an interesting project so I wanted to give it a try but following these instructions:

    $ git clone https://github.com/LighghtEeloo/flow.er.git && cd flow.er/flow_vase/flow_yew
    $ trunk serve
    

    (I also had to uncomment "flow_vase/flow_yew" in the workspace members)

    I got:

       Compiling flow-yew v0.2.2 (/tmp/flow.er/flow_vase/flow_yew)
    error[E0432]: unresolved imports `flow_vessel::CubeMember`, `flow_vessel::cubes`
     --> flow_vase/flow_yew/src/vase/cube_vm.rs:3:25
      |
    3 | use flow_vessel::{Cube, CubeMember, CubeMeta, CubeType, EntityId, Tube::*, Vessel, ViewMode, cubes};
      |                         ^^^^^^^^^^ no `CubeMember` in the root                               ^^^^^ no `cubes` in the root
    
    error[E0432]: unresolved import `flow_vessel::ClauseTreeCore`
     --> flow_vase/flow_yew/src/vase/cube_vm.rs:4:5
      |
    4 | use flow_vessel::ClauseTreeCore;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ClauseTreeCore` in the root
    
    error[E0432]: unresolved import `flow_vessel::ClauseTreeCore`
     --> flow_vase/flow_yew/src/vase/cube_vm/clause_tree.rs:3:19
      |
    3 | use flow_vessel::{ClauseTreeCore, CubeMeta, EntityId, EntityNode, Tube::{self, *}, *};
      |                   ^^^^^^^^^^^^^^ no `ClauseTreeCore` in the root
    
    error[E0433]: failed to resolve: could not find `cubes` in `flow_vessel`
      --> flow_vase/flow_yew/src/vase/cube_vm/btn.rs:11:40
       |
    11 |                     cube: flow_vessel::cubes::Inkblot { obj }.into(),
       |                                        ^^^^^ could not find `cubes` in `flow_vessel`
    
    error[E0433]: failed to resolve: use of undeclared crate or module `cubes`
       --> flow_vase/flow_yew/src/vase/mod.rs:131:13
        |
    131 |             cubes::ClauseTreeCube {
        |             ^^^^^ use of undeclared crate or module `cubes`
    
    error[E0433]: failed to resolve: use of undeclared crate or module `cubes`
       --> flow_vase/flow_yew/src/vase/mod.rs:144:13
        |
    144 |             cubes::Inkblot {
        |             ^^^^^ use of undeclared crate or module `cubes`
    
    error[E0422]: cannot find struct, variant or union type `EntityDive` in this scope
      --> flow_vase/flow_yew/src/vase/cube_vm/btn.rs:47:18
       |
    47 |                 [EntityDive { id, idx }]
       |                  ^^^^^^^^^^
       | 
      ::: /tmp/flow.er/flow_vessel/src/tube.rs:49:5
       |
    49 |     EntityDevote {
       |     ------------ similarly named variant `EntityDevote` defined here
       |
    help: a variant with a similar name exists
       |
    47 |                 [EntityDevote { id, idx }]
       |                  ^^^^^^^^^^^^
    help: consider importing this variant
       |
    1  | use crate::vase::Msg::EntityDive;
       |
    
    error[E0422]: cannot find struct, variant or union type `EntityEmerge` in this scope
      --> flow_vase/flow_yew/src/vase/cube_vm/btn.rs:57:18
       |
    57 |                 [EntityEmerge { id }]
       |                  ^^^^^^^^^^^^
       | 
      ::: /tmp/flow.er/flow_vessel/src/tube.rs:57:5
       |
    57 |     EntityErase {
       |     ----------- similarly named variant `EntityErase` defined here
       |
    help: a variant with a similar name exists
       |
    57 |                 [EntityErase { id }]
       |                  ^^^^^^^^^^^
    help: consider importing this variant
       |
    1  | use crate::vase::Msg::EntityEmerge;
       |
    
    error[E0422]: cannot find struct, variant or union type `EntityUp` in this scope
      --> flow_vase/flow_yew/src/vase/cube_vm/btn.rs:67:18
       |
    67 |                 [EntityUp { id }]
       |                  ^^^^^^^^
       | 
      ::: /tmp/flow.er/flow_vessel/src/entity/identity.rs:3:1
       |
    3  | pub type EntityId = TimeUnique;
       | ------------------------------- similarly named type alias `EntityId` defined here
       |
    help: a type alias with a similar name exists
       |
    67 |                 [EntityId { id }]
       |                  ^^^^^^^^
    help: consider importing this variant
       |
    1  | use crate::vase::Msg::EntityUp;
       |
    
    error[E0422]: cannot find struct, variant or union type `EntityDown` in this scope
      --> flow_vase/flow_yew/src/vase/cube_vm/btn.rs:77:18
       |
    77 |                 [EntityDown { id }]
       |                  ^^^^^^^^^^
       | 
      ::: /tmp/flow.er/flow_vessel/src/tube.rs:43:5
       |
    43 |     EntityGrow,
       |     ---------- similarly named variant `EntityGrow` defined here
       |
    help: a variant with a similar name exists
       |
    77 |                 [EntityGrow { id }]
       |                  ^^^^^^^^^^
    help: consider importing this variant
       |
    1  | use crate::vase::Msg::EntityDown;
       |
    
    error[E0599]: no method named `get_cube_vec` found for struct `flow_vessel::Vessel` in the current scope
      --> flow_vase/flow_yew/src/vase/mod.rs:31:28
       |
    31 |         let cubes = vessel.get_cube_vec();
       |                            ^^^^^^^^^^^^ method not found in `flow_vessel::Vessel`
    
    error[E0599]: no method named `get_cube_vec` found for struct `flow_vessel::Vessel` in the current scope
      --> flow_vase/flow_yew/src/vase/mod.rs:65:37
       |
    65 |             let cubes = self.vessel.get_cube_vec();
       |                                     ^^^^^^^^^^^^ method not found in `flow_vessel::Vessel`
    
    error[E0277]: a value of type `std::vec::Vec<TimeUnique>` cannot be built from an iterator over elements of type `Result<TimeUnique, flow_arena::flow::FlowError>`
       --> flow_vase/flow_yew/src/vase/mod.rs:105:8
        |
    105 |     }).collect();
        |        ^^^^^^^ value of type `std::vec::Vec<TimeUnique>` cannot be built from `std::iter::Iterator<Item=Result<TimeUnique, flow_arena::flow::FlowError>>`
        |
        = help: the trait `FromIterator<Result<TimeUnique, flow_arena::flow::FlowError>>` is not implemented for `std::vec::Vec<TimeUnique>`
    
    error[E0599]: no variant or associated item named `ProcessTracker` found for enum `flow_vessel::Symbol` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:119:53
        |
    119 |     v.entity_mut(&id[7]).map(|x| x.symbol = Symbol::ProcessTracker(Process::New) );
        |                                                     ^^^^^^^^^^^^^^ variant or associated item not found in `flow_vessel::Symbol`
    
    error[E0599]: no method named `entity_devote_push` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:121:7
        |
    121 |     v.entity_devote_push(id[1], id[0]);
        |       ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no method named `entity_devote_push` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:122:7
        |
    122 |     v.entity_devote_push(id[2], id[0]);
        |       ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no method named `entity_devote_push` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:123:7
        |
    123 |     v.entity_devote_push(id[3], id[0]);
        |       ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no method named `entity_devote_push` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:124:7
        |
    124 |     v.entity_devote_push(id[4], id[0]);
        |       ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no method named `entity_devote_push` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:125:7
        |
    125 |     v.entity_devote_push(id[5], id[0]);
        |       ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no method named `entity_devote_push` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:126:7
        |
    126 |     v.entity_devote_push(id[6], id[0]);
        |       ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no method named `entity_devote_push` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:127:7
        |
    127 |     v.entity_devote_push(id[7], id[6]);
        |       ^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no variant or associated item named `Board` found for enum `flow_vessel::Router` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:128:26
        |
    128 |     let router = Router::Board;
        |                          ^^^^^ variant or associated item not found in `flow_vessel::Router`
    
    error[E0599]: no method named `replace_cube` found for struct `Glass` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:137:17
        |
    137 |         v.glass.replace_cube(
        |                 ^^^^^^^^^^^^ help: there is an associated function with a similar name: `place_cube`
    
    error[E0599]: no method named `insert_cube` found for struct `Glass` in the current scope
       --> flow_vase/flow_yew/src/vase/mod.rs:149:17
        |
    149 |         v.glass.insert_cube(
        |                 ^^^^^^^^^^^ method not found in `Glass`
    
    error[E0277]: a value of type `std::vec::Vec<TimeUnique>` cannot be built from an iterator over elements of type `Result<TimeUnique, flow_arena::flow::FlowError>`
       --> flow_vase/flow_yew/src/vase/mod.rs:162:8
        |
    162 |     }).collect();
        |        ^^^^^^^ value of type `std::vec::Vec<TimeUnique>` cannot be built from `std::iter::Iterator<Item=Result<TimeUnique, flow_arena::flow::FlowError>>`
        |
        = help: the trait `FromIterator<Result<TimeUnique, flow_arena::flow::FlowError>>` is not implemented for `std::vec::Vec<TimeUnique>`
    
    error[E0609]: no field `router` on type `flow_vessel::Vessel`
      --> flow_vase/flow_yew/src/vase/update.rs:66:29
       |
    66 |                 self.vessel.router = router;
       |                             ^^^^^^ unknown field
       |
       = note: available fields are: `glass`, `settings`
    help: one of the expressions' fields has a field of the same name
       |
    66 |                 self.vessel.glass.router = router;
       |                             ^^^^^^
    
    error[E0308]: mismatched types
      --> flow_vase/flow_yew/src/vase/update.rs:76:45
       |
    76 |                 self.vessel.glass.push_cube(cube.clone(), meta.router);
       |                                             ^^^^^^^^^^^^ expected struct `TimeUnique`, found struct `flow_vessel::Cube`
    
    error[E0599]: no method named `entity_dive` found for struct `flow_vessel::Vessel` in the current scope
      --> flow_vase/flow_yew/src/vase/update.rs:98:29
       |
    98 |                 self.vessel.entity_dive(id, idx);
       |                             ^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_devote`
    
    error[E0599]: no method named `entity_emerge` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/update.rs:102:29
        |
    102 |                 self.vessel.entity_emerge(id);
        |                             ^^^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_erase`
    
    error[E0308]: mismatched types
       --> flow_vase/flow_yew/src/vase/update.rs:106:43
        |
    106 |                 self.vessel.entity_remove(&id);
        |                                           ^^^
        |                                           |
        |                                           expected struct `TimeUnique`, found `&TimeUnique`
        |                                           help: consider removing the borrow: `id`
    
    error[E0599]: no method named `entity_up` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/update.rs:110:29
        |
    110 |                 self.vessel.entity_up(id);
        |                             ^^^^^^^^^ help: there is an associated function with a similar name: `entity_mut`
    
    error[E0599]: no method named `entity_down` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/update.rs:114:29
        |
    114 |                 self.vessel.entity_down(id);
        |                             ^^^^^^^^^^^ help: there is an associated function with a similar name: `entity_grow`
    
    error[E0599]: no method named `get_cube_vec` found for struct `flow_vessel::Vessel` in the current scope
       --> flow_vase/flow_yew/src/vase/update.rs:128:41
        |
    128 |                 let cubes = self.vessel.get_cube_vec();
        |                                         ^^^^^^^^^^^^ method not found in `flow_vessel::Vessel`
    
    error[E0599]: no variant or associated item named `vec_all` found for enum `flow_vessel::Router` in the current scope
      --> flow_vase/flow_yew/src/vase/view.rs:20:62
       |
    20 |         let router_meta: Vec<(&str, Router, bool)> = Router::vec_all()
       |                                                              ^^^^^^^ variant or associated item not found in `flow_vessel::Router`
    
    error[E0609]: no field `router` on type `flow_vessel::Vessel`
      --> flow_vase/flow_yew/src/vase/view.rs:49:34
       |
    49 |         let router = self.vessel.router;
       |                                  ^^^^^^ unknown field
       |
       = note: available fields are: `glass`, `settings`
    help: one of the expressions' fields has a field of the same name
       |
    49 |         let router = self.vessel.glass.router;
       |                                  ^^^^^^
    
    error[E0609]: no field `router` on type `&flow_vessel::Vessel`
      --> flow_vase/flow_yew/src/vase/cube_vm.rs:28:32
       |
    28 |                 router: vessel.router,
       |                                ^^^^^^ unknown field
       |
       = note: available fields are: `glass`, `settings`
    help: one of the expressions' fields has a field of the same name
       |
    28 |                 router: vessel.glass.router,
       |                                ^^^^^^
    
    error[E0599]: no method named `member_traverse` found for struct `flow_vessel::Cube` in the current scope
      --> flow_vase/flow_yew/src/vase/cube_vm.rs:32:28
       |
    32 |         let ref_map = cube.member_traverse(vessel)
       |                            ^^^^^^^^^^^^^^^ method not found in `flow_vessel::Cube`
    
    error[E0599]: no method named `member_traverse` found for reference `&flow_vessel::Cube` in the current scope
      --> flow_vase/flow_yew/src/vase/cube_vm.rs:48:29
       |
    48 |         self.ref_map = cube.member_traverse(vessel)
       |                             ^^^^^^^^^^^^^^^ method not found in `&flow_vessel::Cube`
    
    error[E0308]: mismatched types
      --> flow_vase/flow_yew/src/vase/cube_vm/btn.rs:24:21
       |
    24 |                     dude,
       |                     ^^^^
       |                     |
       |                     expected enum `Option`, found struct `TimeUnique`
       |                     help: try using a variant of the expected enum: `Some(dude)`
       |
       = note: expected enum `Option<TimeUnique>`
                found struct `TimeUnique`
    
    error[E0282]: type annotations needed
      --> flow_vase/flow_yew/src/vase/cube_vm/clause_tree.rs:14:10
       |
    14 | #[derive(Properties, Clone)]
       |          ^^^^^^^^^^ cannot infer type for type parameter `T` declared on the enum `Option`
       |
       = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
    
    warning: unreachable expression
      --> flow_vase/flow_yew/src/vase/cube_vm/clause_tree.rs:49:9
       |
    42 | /         match msg {
    43 | |             Msg::Tube(tube) => {
    44 | |                 // Todo:: tube callback.
    45 | |                 // self.props.link_tube.callback(|_| tube).emit(());
    46 | |                 todo!()
    47 | |             }
    48 | |         }
       | |_________- any code following this `match` expression is unreachable, as all arms diverge
    49 |           true
       |           ^^^^ unreachable expression
       |
       = note: `#[warn(unreachable_code)]` on by default
    
    error[E0599]: no method named `id` found for reference `&flow_arena::arena::FlowNode<TimeUnique, Entity>` in the current scope
      --> flow_vase/flow_yew/src/vase/cube_vm/clause_tree.rs:81:19
       |
    81 |     let id = node.id().clone();
       |                   ^^ private field, not a method
       |
       = help: items from traits can only be used if the trait is in scope
       = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
               `use flow_arena::flow::Node;`
    
    error[E0308]: mismatched types
      --> flow_vase/flow_yew/src/vase/cube_vm/clause_tree.rs:96:49
       |
    96 | ...                   [ EntityAdd { dude: id, owner: id, idx: 0 }
       |                                           ^^
       |                                           |
       |                                           expected enum `Option`, found struct `TimeUnique`
       |                                           help: try using a variant of the expected enum: `Some(id)`
       |
       = note: expected enum `Option<TimeUnique>`
                found struct `TimeUnique`
    
    error: aborting due to 42 previous errors; 1 warning emitted
    
    Some errors have detailed explanations: E0277, E0282, E0308, E0422, E0432, E0433, E0599, E0609.
    For more information about an error, try `rustc --explain E0277`.
    error: could not compile `flow-yew`
    
    To learn more, run the command again with --verbose.
    May 21 13:54:25.563 ERROR ❌ error
    error from HTML pipeline
    
    Caused by:
        0: failed to spawn assets finalization
        1: error during cargo build execution
        2: cargo call returned a bad status
    May 21 13:54:25.563  INFO 📡 server running at http://127.0.0.1:9720/
    

    Could you please advise how to overcome this?

    Cheers...

    opened by Rezney 0
Owner
null
call rest api using rust + yew

Call Rest API With Rust and Yew: USA Weather Service API Open Data YEW Complete Tutorial YouTube Video https://youtu.be/dSJULWtd3y0 How to run trunk s

Security Union 8 Dec 23, 2022
The uncomplicated Yew State management library

Bounce The uncomplicated state management library for Yew. Bounce is inspired by Redux and Recoil. Rationale Yew state management solutions that are c

Kaede Hoshikawa 5 Dec 1, 2022
An example bdk + yew single page web wallet

bdk-yew-example This project builds a simple bdk-wasm based testnet wallet as a single page web app. The page can be hosted locally or automatically d

Steve Myers 2 May 21, 2022
plugy empowers you to construct agnostic dynamic plugin systems using Rust and WebAssembly.

plugy plugy is a plugin system designed to enable the seamless integration of Rust-based plugins into your application. It provides a runtime environm

Geoffrey Mureithi 22 Aug 12, 2023
🚀 An OSS project to develop and run serverless applications on WebAssembly

Wasm Workers Server Wasm Workers Server (wws) is a framework to develop and run serverless applications server in WebAssembly. These applications are

VMware  Labs 300 Apr 26, 2023
WebAssembly implementation from scratch in Safe Rust with zero dependencies

wain wain is a WebAssembly INterpreter written in Rust from scratch with zero dependencies. An implementation of WebAssembly. Features: No unsafe code

Linda_pp 328 Jan 2, 2023
witgen is a library to generate .wit files for WebAssembly in Rust

witgen witgen is a library to help you generate wit definitions in a wit file for WebAssembly. Using this lib in addition to wit-bindgen will help you

Coenen Benjamin 28 Nov 9, 2022
Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.

Percy Build frontend browser apps with Rust + WebAssembly. Supports server side rendering. The Percy Book This README gives a light introduction to Pe

Chinedu Francis Nwafili 2.1k Jan 1, 2023
Rust bindings for Supabase JavaScript library via WebAssembly.

supabase-js-rs Rust bindings for Supabase JavaScript library via WebAssembly. Usage Add supabase-js-rs to Cargo.toml supabase-js-rs = { version = "0.1

Valery Stepanov 8 Jan 13, 2023
Let's pretend that life-before-main exists for Rust targeting WebAssembly

Let's pretend that life-before-main exists for Rust targeting WebAssembly. Installation Add a dependency on wasm-init. This crate intentionally provid

Ruan Pearce-Authers 7 Aug 29, 2023