Seed is a Rust front-end framework for creating fast and reliable web apps with an Elm-like architecture.

Overview

crates.io version crates.io downloads docs.rs Built with cargo-make

Website | Discord


Seed is a Rust front-end framework for creating fast and reliable web apps with an Elm-like architecture.

  • completely written in Rust, including the templating system (e.g. div! macro).
  • built-in state management that is based on the Elm architecture.
  • a batteries-included approach with a focus on developer experience.
  • clear and extensive documentation for Rust beginners and pros alike.
  • WebAssembly.

Why Seed?

Seed allows you to develop the front-end with all the benefits of Rust, meaning speed, safety, and too many more things to count.

The Seed templating system uses a macro syntax that makes Rustaceans feel right at home. This means linting, formatting, and commenting will work, and it's all in Rust. This is opposed to a JSX-like syntax that relies on IDE extensions to improve the developer experience.

Seed has a batteries-included approach. This means less time writing boilerplate and less time installing dependencies.

Why not Seed?

  • It's newer. It's harder to find support outside of Discord.
  • WebAssembly is newer with less support. Browser compatibility is at 92.9%.
  • Pre-built components are rare. You will likely have to roll your own components such as date pickers.
  • No server-side rendering yet (#232).
  • You may prefer other Rust frameworks like MoonZoon or Yew.

Getting Started

To get started right away, we can use the quickstart template:

cargo install cargo-generate
cargo install trunk
cargo install wasm-bindgen-cli
cargo generate --git https://github.com/seed-rs/seed-quickstart.git --name seed-quickstart
cd seed-quickstart
trunk serve

If you get an error about wasm being linked against a different version of wasm-bindgen, just follow the suggestion to run cargo update -p wasm-bindgen. This will fix the linkings.

You should now see a working counter app in your browser at localhost:8080.

Getting into Seed

The Seed website and the library docs are the best way to learn about the functionalities of Seed.

The Seed examples are another good resource.

Trunk is the recommended application bundler for Seed. Seed projects are typically run with trunk serve instead of cargo run. You might also see cargo make start project_name in the examples. Going forward, we recommend using Trunk.

Seed Styles is a styling library for Seed to create global and scoped styles.

To use web APIs, there is web-sys which is a part of the wasm-bindgen project. wasm-bindgen is a dependency of Seed.

There are also two template repositories. However, they are not currently up to date.

FAQ

How stable is Seed?

As a framework, Seed is mostly feature-complete. You can build complete web apps in Seed. Projects built in Seed do use Rust stable. Being in Rust, it's easy to create robust, predictable programs.

What's next for Seed?

Check out the roadmap.

Documentation

Resources

Seed

Rust

Contributing

See CONTRIBUTING.md.

Supported By

See BACKERS.md.

This project is supported by:

The Seed website is served by Netlify.

Netlify

Comments
  • Working out on routing

    Working out on routing

    Hello everybody :smiley:

    UPDATE

    Here is the latest API

    /// The RoutingModule makes the enum variants representing modules loaded by the routes
    /// By default, an enum variant snake case is equal to its module name
    ///
    ///  You can rename the path
    ///  You can specify routes that does not load module ( no init, no specific Model & Msg and no view )
    ///
    ///  When loading the module, a parser will get the init function , Model, Msg, Routes, Update, and View
    ///
    
    #[derive(Debug, PartialEq, Clone, RoutingModules)]
    // need to make a derive (Routing) or something maybe
    #[modules_path = "pages"]
    pub enum Routes {
        Login {
            query: IndexMap<String, String>, // -> http://localhost:8000/login?name=JohnDoe
        },
        Register,
        #[guard = " => guard => forbidden"]
        Dashboard(DashboardRoutes), // -> http://localhost:8000/dashboard/*
        // // #[default_route]
        #[guard = " => admin_guard => forbidden_user"]
        Admin {
            // -> /admin/:id/*
            id: String,
            children: AdminRoutes,
        },
        #[default_route]
        #[view = " => not_found"] // -> http://localhost:8000/not_found*
        NotFound,
        #[view = " => forbidden"] // -> http://localhost:8000/forbidden*
        Forbidden,
        #[as_path = ""]
        #[view = "theme => home"] // -> http://localhost:8000/
        Home,
    }
    
    

    I previously had OnInit and OnView derive but I removed them since RoutingModulesis enough. I also had #[model_scope] for fn init that I removed since it is automatically done with the RoutingModulesnow

    End of Update

    This PR is related to https://github.com/seed-rs/seed/issues/383

    I am soo happy to show you what I have done so far but on the other hand, I am not entirely sure about your expectations regarding routing in general. This is just an example and the PR is a draft. This routing is built on the top for what we already have in Seed.

    Basically my router listen to Msg::UrlRequested and then do stuff

    The router can also accept closure to notify.

    |r| orders.notify(subs::UrlRequested::new(r))

    All your inputs are welcome to higher up this example to match your expectations & standards. As a newbie to rust I am facing few challenges:

    • I have never implemented something like this from scratch (in rust at least).
    • My main strength in Rust is doc and test and finding bug.
    • I do not understand macro stuff for now.
    • I have never been this deep into routing at least this year.
    • I have some issue with enum.

    I want to help and at the same time challenge myself, that is why I accepted starting something on routing also I did not look at any tutorials.

    Here is the todo list on this example that might be relevant.

    • [x] add UML schema that show the lifecyle of the router.
    • [x] navigate through route, update url , go back & forward in history as mentioned in the issue.
    • [x] having authenticated routes and guard them.
    • [x] having nested routes.
    • [x] having unit test.
    • [x] work on the api.

    PS: Here is the new todo list :+1: There are a lot of things probably wrong right now in the implementation, but it does the job for simple routing.

    PS: my boilerplate in the init is ugly :hankey: , we need to fix it :stuck_out_tongue_closed_eyes:

    Let's see what you think :+1: and let's make it beautiful :heart:

    Update

    We are working with @mankinskin together on it.

    Now we have a crate for parsing enums into path : enum_paths

    So we moved further into solving the nested route challenge:

    • Nested routing now works
    • Presenting the route needs to be done

    So here is an intermediate todo that I suggest

    • [x] change attribute "name" to path.
    #[derive(Debug, PartialEq, Copy, Clone, AsPath)]
    pub enum DashboardRoutes {
        Message,
        Statistics,
        #[path  = ""]
        Root,
    }
    
    • [x] ~~find a way to get the name~~ :

    ex : the route "http://localhost:8000/dashboard/message" would be Message

    let name = Routes::Dashboard(DashboardRoutes::Message).get_name();
    log!(name);
    //--> Message
    
    
    • [x] find a way to display routes & nested routes in a menu.
    ├── Home
    ├── Login
    ├── Register
    
    └── Dashboard
             ├── Root
             ├── Message
             ├── Statistics
    ├── NotFound
    

    I need to chew on it tonight but I think I am having an idea on what to do tomorrow :

    • [x] Implement extracting query parameter from String to enum and from enum to String + derive Macro
    "dashboard/tasks/task/1?assigned=arn-the-long-beard" 
    
    • [x] Implement nested routes inside dynamic + derive Macro if needed
    "dashboard/tasks/task/1/description"
    
    
    • [x] Handle default route when no routes are matched + derive Macro if needed
    pub enum MyRoutes {
        Login,
        Register,
        Dashboard(DashboardRoutes),
        #[default_route]
        NotFound,
        #[as_path = ""]
        Home,
        // Admin(page::admin::Model),
    }
    
    
    • [x] Handle protected route + derive Macro if needed How to specify a route is guarded ? custom attributes or specific field ?

    • [x] Give access on the routing for init of page/component + derive Macro if needed

    Msg::UrlChanged(subs::UrlChanged(url)) => model.page = Page::init(url, orders),
    
    

    We need this to control init and pass orders to sub pages/components

    • [x] Implement conversion to Route struct which hold information + impl + derive Macro if needed
    pub struct Route {
      pub full_path: String,
        pub url: Option<Url>,
        pub segment:String,
        pub guarded: bool,
        pub default: bool,
        pub query_parameters: HashMap<String, String>,
        pub value: Routes,
    
    

    Having this live conversion could help us to manipulate routes inside sub_pages / component easier

    • [x] Unify the Api for custom router Having one single Router generated by the enum maybe Having easy API this way
    #[derive(Routing)]
    pub enum Routes {
        Login,
        Register,
        #[protected_route="user"]
        Dashboard(DashboardRoutes),
        #[default_route]
        NotFound,
        #[as_path = ""]
        Home,
        // Admin(page::admin::Model),
    }
    
    
    #[derive(Routing)]
    pub enum Routes {
        Login,
        #[init = "pages::register::init"]
        Register,
        #[protected_route="user"]
        Dashboard(DashboardRoutes),
        #[default_route]
        NotFound,
        #[as_path = ""],
        Profile { param_id : String }, 
        Home { query_parameters : Hashmap<String,String> },
        // Admin(page::admin::Model),
    }
    
    
    opened by arn-the-long-beard 56
  • Rendering issue with similar elements under different parents.

    Rendering issue with similar elements under different parents.

    I've been running into an issue where I have a few views which have a somewhat similar layout.

    When the view is changed, the child elements which are similar are not updated. It would seem that the diffing algorithm is not taking into account certain attributes during the diff. The exact issue is as follows:

    • two different parent elements with similar layout.
    • both have an input element. The placeholders are different and even their bound At::Values are different.
    • when switching between the views, the input elements are not updated.

    I tried using different IDs on the parent elements which are being changed, in hopes that the diffing algorithm would see this as a fundamentally different element and invalidate all of its children, but I know there are lots of nuances here.

    I have the code in a public repo, let me know if you need repro steps.

    opened by thedodd 29
  • Use an existing virtual DOM implementation

    Use an existing virtual DOM implementation

    Instead of reinventing the wheel, it might be helpful to use an existing crate like one of the following:

    • https://crates.io/crates/virtual-dom-rs
    • https://crates.io/crates/squark-macros
    • https://crates.io/crates/dominator (based on stdweb)
    • https://crates.io/crates/simi (different direction)
    • https://github.com/bodil/typed-html What do you think?
    enhancement 
    opened by flosse 26
  • New AppBuilder API

    New AppBuilder API

    @MartinKavik @David-OConnor I'm starting to get half a mind to move the Init from build to run or something similar to isolate all the side effects inside of run instead of distributing the stateful effects across finish and run.

    I think that this is better since we do this weird dance around initial_orders right now where we don't quite have the correct state to do what we have half the state we want inside Builder and half the state inside the App.

    So we would have

    App::build(update, view).finish().run_with_init(|_, _| {
        // Do things with url + orders.
        // `Init::default` is a wrapper for `Init::new(Model::default())`.
        Init::default()
    })
    

    or

    App::build(update, view).finish().run() // Calls `Init::default` by default.
    

    It's a bit of a departure from what we currently have, but I think that it makes the implementation a little less weird and the usage clearer about when exactly the InitFn happens (since it seems to run half in finish and half in run right now).

    Personally, I also think that mount should also be inside Init since we might want to mount it to a different place depending on the initial route, but we seem to keep that around forever, so I changed my mind. Point is, there are parts of AppCfg that are not immutable, and I would like to change that.

    The downsides, I think, are also fairly obvious in that it's a breaking change, and so on. Also, the model is now provided in the run method instead of the build method, which is also... unique, so to speak.

    I haven't seen if the types work out yet, but it seems reasonable to me.

    Originally posted by @AlterionX in https://github.com/David-OConnor/seed/pull/235#issuecomment-542944604

    opened by MartinKavik 24
  • Hooking into lifecycle events for cleanup

    Hooking into lifecycle events for cleanup

    Description

    Components have lifecycle hooks but do not provide a means to update the state of the app. This makes it difficult to cleanup any component actions. For example, consider a component that when mouseover occurs, will fetch data every ten seconds. When I leave the page and the component unmounts, I can catch the unmount event, but I have no way to send a message that would allow me to stop fetching.

    I was able to handle this before the update to 0.3 by using state.update in the view function; but state is no longer passed in as an argument. At the moment, we are slowly integrating seed into an existing app, so we are not at the point where we are using routes (I think I could hook into there if I was). I think the easiest thing (from my point of view) would be to provide a way to send messages in lifecycle callbacks, similar to how events can send messages in their callback function. Is this something that can be done?

    Regards,

    Will

    help wanted missing functionality high priority 
    opened by johnsonw 24
  • class! improvements

    class! improvements

    Suggested class! changes:

    • [x] Rename class! to C! to improve readability and make it consistent with A, S, E, and T.
    • [x] Accepts also String and other text types.
    • [x] Don't write empty class to HTML, i.e. class![] shouldn't be rendered as <div class>.

    Note: We need to write if_ function.

    API design 
    opened by MartinKavik 22
  • Change vdom bootstrapping to occur before the initial orders are processed.

    Change vdom bootstrapping to occur before the initial orders are processed.

    Changes:

    • Change execution of the initial call to process_cmd_and_msg_queue to after the main_el_vdom is initialized. This allows for the msg processing to not cause issues if it attempts to force a render or something else similar. Forcing a render on init used to cause Seed to panic.
    • Allow Seed to take over the children of the mount. This can be useful for SSR. Built-in SSR for Seed is my goal for now. This is partially related to #232, which is also related to #223.
    • Warns of possibly questionable behavior when attempting to accomplish the above maneuver as it is now (see the doc comment for takeover_mount in AppBuilder). Due to this behavior and backwards compatibility, it is currently an opt in functionality.
    • Adds a bunch of utility methods to the Node enum.
    • Adds a function to recursively remove all workspace web_sys::Nodes.

    Parts that need additional consideration (incomplete)

    • Unsure if the listeners in the bootstrap should be set up -- not familiar with what they do. But it seems to work for now.
    • Unsure of any other implications of moving the initial order processing to after the initialization of the main_el_vdom.
    • Not sure if any of the utility methods added to the Node enum are actually of use.
    • Might want to fully address the "recreation" behavior of bootstrap_vdom before this gets merged.
    opened by AlterionX 21
  • window_events only appears to emit first event

    window_events only appears to emit first event

    Consider:

            fn window_events(model: &Model) -> Vec<seed::dom_types::Listener<Msg>> {
                vec![
                    mouse_ev(Ev::Click, |_| Msg::Increment),
                    mouse_ev(Ev::Click, |_| Msg::Increment),
                    mouse_ev(Ev::Click, |_| Msg::Increment),
                    mouse_ev(Ev::Click, |_| Msg::Increment),
                    mouse_ev(Ev::Click, |_| Msg::Increment),
                ]
            }
    

    Where Msg::Increment just increments a counter on the model that starts at 0.

    When a click event occurs, I'd expect the counter to increment to 5. Instead it only increments to 1.

    Interestingly, all 5 listeners can be seen on the window:

    Screen Shot 2019-06-13 at 2 54 57 PM

    I think there may be some sort of listener detach / re-attach that occurs after the first event and somehow causes the rest to be skipped.

    bug 
    opened by jgrund 20
  • Add More impls for UpdateEl ..

    Add More impls for UpdateEl ..

    Hi, I would like to implement UpdateEl for missing types, such as:

    impl<Ms, T> UpdateEl<El<Ms>> for Option<T>
    where
        T: UpdateEl<El<Ms>> { .. }
    
    impl<Ms, T, E> UpdateEl<El<Ms>> for Result<T, E>
    where
        T: UpdateEl<El<Ms>>,
        E: UpdateEl<El<Ms>> { .. }
    
    // this would replace Vec<Style>, Vec<&Style>, Vec<EventHandler<Ms>>, Vec<El<Ms>> ...etc
    impl<Ms, T> UpdateEl<El<Ms>> for Vec<T>
    where
        T: UpdateEl<El<Ms>> { .. }
    
    opened by MuhannadAlrusayni 19
  • option for immutable model?

    option for immutable model?

    Is there a way to have an immutable Model as in Elm? The examples I've found don't return anything from update and mutate the model in place, e.g., https://github.com/David-OConnor/seed/blob/master/examples/counter/src/lib.rs#L37

    The type signature of update suggests this is not possible, since it takes &mut Model as a parameter, and doesn't seem to have a return value: https://github.com/David-OConnor/seed/blob/master/src/vdom.rs#L141

    opened by dave-doty 19
  • New Feature Expected: Decoupling Component

    New Feature Expected: Decoupling Component

    Hi,

    I'm watching seed several month. I like it and hope it become the wide-using wasm webapp dev framework.

    everything is fine, except the following:

    I'd like to create a frontend component library, like [ng-bootstrap](https://ng-bootstrap.github.io/#/components/alert/examples), using seed. It's a difficult task!

    Is it possible that seed provide REACT like component, which have global level MODEL and component level MODEL at the same time?

    Is it possible to provide a mechanism that make component can communicate with each other?

    opened by zengsai 18
  • support `beforeinput` events

    support `beforeinput` events

    Disclaimer: I'm new to the Seed library; please let me know if this issue is misinformed.

    Seed appears to not support the beforeinput event (i.e., is absent from event_names.rs).

    This issue is to request support for the beforeinput event.

    opened by CrepeGoat 0
  • Revert

    Revert "Remove unused fields"

    This reverts commit 08c4ce15255ac8d03df5315796e7b63e624e2987.

    The fields are considered as unused by rustc, however they might be stored to be dropped in the right moment.

    In the future we should analyze which field we can really delete, however I think we can do without such clean-up as Seed 0.8 is not the current version of Seed.

    See: https://github.com/seed-rs/seed/issues/701

    opened by wkordalski 0
  • [0.8.x] WebSocket and too early dropped closure

    [0.8.x] WebSocket and too early dropped closure

    Commit 08c4ce15255ac8d03df5315796e7b63e624e2987 introduced some bug:

    Uncaught Error: closure invoked recursively or destroyed already
        at imports.wbg.__wbindgen_throw
        at wasm_bindgen::throw_str::ha13545fa78d0389b
        at <dyn core::ops::function::Fn<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::he801481bf9a481f4
        at __wbg_adapter_42
        at WebSocket.real
    

    I suppose, one of the unused fields were used to prevent from dropping the closure mentioned above. Rust says the field is unused, because its only use is to run drop() in the right moment. We should mark that field with #[allow(unused)] (or some more specific lint from the "unused" group) instead of removing it.

    bug 
    opened by wkordalski 0
  • Seed 0.8 accepting the newest wasm-bindgen

    Seed 0.8 accepting the newest wasm-bindgen

    Seed 0.8 extended Closure with new method via a trait, because this method was missing in wasm-bindgen < 0.2.81. wasm-bindgen 0.2.81 introduced Closure::new.

    Thus Closure::new changed meaning from <Closure as ClosureNew>::new() to Closure::new leading to compilation errors. These errors were fixed in Seed 0.9 (probably f284711f3fc4a9deebf70c9f0ce4d8ec1daca36f). Could you backport this fix to Seed 0.8, so that apps using Seed 0.8 can be compiled correctly using the newest version of wasm-bindgen?

    https://github.com/seed-rs/seed/issues/685 is blocking me from moving to Seed 0.9.

    I can create pull request with backported fix if you want. Unfortunatelly I cannot publish it to crates.io.

    opened by wkordalski 3
  • Release v0.9.2

    Release v0.9.2

    Before the release

    • [x] 1. Create a new issue
    • [x] 2. Update all official examples.
    • [x] 3. Review the commit and PR history since last release. Ensure that all relevant changes are included in CHANGELOG.md, and that breaking changes are specifically annotated.
    • [x] 4. Ensure the README.md reflects API changes.
    • [x] 5. Update the CHANGELOG.md with the new release version.
    • [x] 6. Ensure the version listed in Cargo.toml is updated.
    • [x] 7. Update Rust tools: rustup update.
    • [x] 8. Run cargo make populate_all to synchronize St, At and other enums with official values.
    • [x] 9. Run cargo make verify to ensure tests pass, and clippy / fmt are run.
    • [x] 10. Commit and push the repo.
    • [x] 11. Check that CI pipeline passed.
    • [x] 12. Run cargo package.
    • [x] 13. Run cargo publish.
    • [x] 14. Add a release on Github, following the format of previous releases.
    • [ ] 15. Verify the docs page updated correctly.

    After the release

    • [ ] 16. Update all quickstarts.
    • [ ] 17. Write documentation for the current release on the website.
    • [ ] 18. Make sure the website's version selector shows the released version by default.
    • [ ] 19. Notify authors of community tutorials, quickstarts and examples about a new Seed version.
    • [ ] 20. Write announcements (chat, forum, etc.).
    opened by flosse 3
  • DOM node is not attached to ElRef under some conditions

    DOM node is not attached to ElRef under some conditions

    Versions

    I can reproduce this bug in Seed 0.9 I cannot reproduce this bug in Seed 0.8

    In short:

    1. In view we return something like div![el_ref(&some_elref), div!["Some text"]]
    2. After running view, inside update some_elref.get().is_none() is true.

    This means that DOM node is not attached to ElRef under some conditions.

    Example: https://github.com/wkordalski/seed-elref-bug

    Run it with:

    yarn
    yarn run webpack serve
    

    Open localhost:8888 Open Developer tools (esp. console). Click "Add measurements" few times (not every time this bug is visible)

    Exploading assertion should be visible in the console.

    ...under some conditions

    It seems that this bug is related to running async code or websockets.

    bug 
    opened by wkordalski 6
Releases(0.9.2)
  • 0.9.2(Jul 2, 2022)

    Fixed

    • Make fetch::JsonError public.
    • Adapted to Rust 1.61.0.
    • Make Seed compile with wasm_bindgen >= v0.2.81
    • Decoding WebSocket JSON messages
    Source code(tar.gz)
    Source code(zip)
  • 0.9.1(Apr 14, 2022)

  • 0.9.0(Apr 8, 2022)

    • [BREAKING] Base path changed from Rc<Vec<String>> to Rc<[String]>. It means also Orders::clone_base_path returns a slice.
    • [BREAKING] Hid markdown functionality behind optional markdown feature
    • [BREAKING] Added argument Option<&Namespace> to functions Node::from_html and El::from_html.
    • [BREAKING] Added blanket impl<Ms, T: IntoNodes<Ms>> IntoNode<Ms> for Option<T>. This might conflict with local impls of IntoNodes, but should make those unnecessary and safe to remove.
    • [BREAKING] Removed the deprecated browser::service::fetch module.
    • [BREAKING] fetch::Error::SerdeError changed to fetch::Error::JsonError
    • Fixed: Prevent link listener from intercepting links with the download attribute.
    • Fixed an issue in vdom where inputs with invalid contents being cleared on Firefox.
    • Added helpers for wheel event: wheel_ev and to_wheel_event.
    • Added Response::blob
    • Added panic-hook feature, enabled by default, to conditionally include console_error_panic_hook
    • Added macro raw_svg! (#589).
    • Added browser::dom::Namespace to prelude.
    • Added At::Role variant.
    • Added Response::headers.
    • Added Headers::new.
    • Added Header::name() and Header::value().
    • Added fetch::form_data::FormData and Request.form_data.
    • Added serde-wasm-bindgen and serde-json features to use either serde-wasm-bindgen or serde_json for JSON de-/serialization. serde-wasm-bindgen reduces final binary size for downstream users.serde-json is enabled by default.
    • Added method to return detailed error response from server with FetchError.
    • Added Request.body_ref to take the body by reference.
    • Added sl_input to the custom_elements example.
    • Added examples drag_and_drop, record_screen, e2e_encryption and counters.
    • Added charts example.
    • Added page_trait example.
    • Added on_insert event on elements, triggered when they are inserted into the DOM.
    • Implemented AsAtValue for Option<T>
    • Implemented From<impl AsRef<web_sys::Headers>> for Headers.
    • Implemented FromIterator<(impl Into<Cow<'a, str>>, impl Into<Cow<'a, str>>)> for Headers.
    • Use wheel_ev in canvas example to zoom rectangle with mouse scroll wheel.
    • Derived Eq and PartialEq for Header.
    • Element macros like div! can now contain Iterators inside of Option values. Previously only one or the other was possible.
    • Adapted to Rust 1.60.0.
    • Updated dependencies
    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Oct 23, 2020)

    • [BREAKING] Rename linear_gradient! to linearGradient! for consistency with the other svg macros (same with radial_gradient! and mesh_gradient!) (#377).
    • Fixed base_path with a trailing slash parsing / handling.
    • Fixed C macro memory / WASM file size issue.
    • Added examples tests, service_worker, resize_observer, component_builder, i18n and unsaved_changes (#459).
    • Fixed UrlRequested handling (#459).
    • [BREAKING] Hidden and renamed module effects to effect.
    • Added App::update_with_option.
    • Added Navigator and BeforeUnloadEvent into Seed's web_sys.
    • Fixed runtime exception when using binary data in WS on some browsers (#470).
    • Exported macro with_dollar_sign!.
    • [deprecated] RequestAnimationFrameTime + RequestAnimationFrameHandle + request_animation_frame are deprecated.
    • [deprecated] set_interval + set_timeout are deprecated.
    • [deprecated] class! is deprecated in favor of C!.
    • [BREAKING] Removed deprecated AppBuilder with sink, mount_point, routes, window_events, etc. (Use App::start instead.)
    • [BREAKING] Removed support for deprecated global messages (GMsg, GMs, ..). Use orders.notify + orders.subscribe instead.
    • Relaxed view and update type in App::start from fn to FnOnce + Clone.
    • [BREAKING] Removed deprecated Ev::TriggerUpdate.
    • [deprecated] simple_ev is deprecated.
    • Exposed dependency console_error_panic_hook.
    • Fixed double UrlChanged firing by removing hashchange listener.
    • Added Request::bytes.
    • Build Changes - Remove all workspace=false and instead defined default_to_workspace=false in the config.
    • Build Changes - Make all core cargo-make tasks private with default namespace and remove clear=true from all seed tasks.
    • Build Changes - Remove installation instructions and instead depend on core cargo-make installation tasks.
    • Build Changes - Replace rust for_each implementation with duckscript which is much shorter, simpler and faster (in case you don't have cargo-script installed).
    • Build Changes - Enforce minimal cargo-make version: 0.32.1.
    • Added new Orders methods request_url (#518) and msg_sender (#502).
    • [BREAKING] Orders::msg_mapper returns Rc<..> instead of Box<..>.
    • Reexported pub use wasm_bindgen_futures::{self, spawn_local, JsFuture}; and pub use futures::{self, future::{self, FutureExt, TryFutureExt}}; in lib.rs.
    • Updated example websocket.
    • Fixed link handling (#527).
    • Fixed attribute ordering (#335).
    • Implemented Display for Node (#294).
    • Fixed url requests from pages when the hash routing is used.
    • Fixed url encoding, serializing in push_route and the method Url::hash_path.
    • Added Url methods skip_hash_base_path and encode_uri_component (#424).
    • Added Node::NoChange.
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(May 8, 2020)

    • [BREAKING] Custom elements are now patched in-place (#364). Use el_key to force reinitialize an element.
    • Added el_key method for adding keys to Els (#354).
    • Enabled all additional markdown extensions.
    • Removed 'static bound from El and Node.
    • [BREAKING] Changed perform_cmd and seed::browser::service::fetch return type to T instead of Result<T, T>.
    • Added Aria attributes.
    • [BREAKING] UpdateEl<T> changed to UpdateEl<Ms> and fn update(self, el: &mut T); to fn update_el(self, el: &mut El<Ms>); (#370).
    • Added trait UpdateElForIterator<Ms>.
    • Added support for all Iterators, Option, u32, i32, usize, f64 and references in element creation macros (#365, #128).
    • [BREAKING] String implements UpdateEl<T>. (References are now required for String properties, e.g. div![&model.title].)
    • Fixed href detection to ignore use elements (#384).
    • Added methods subscribe, subscribe_with_handle, perform_cmd_with_handle, stream, stream_with_handle and notify into Orders (#130).
    • Added cmds::timeout, stream::interval, stream::window_event, stream::document_event, subs::UrlChanged and subs::UrlRequested (#131).
    • [BREAKING] Futures in perform_cmd and perform_g_cmd are executed immediately.
    • Added App methods notify and notify_with_notification.
    • [BREAKING] App method process_cmd_and_msg_queue renamed to process_effect_queue.
    • [BREAKING] Url change listeners are always active (even if routes is not defined).
    • Added cmds, streams, subs, CmdHandle, SubHandle and StreamHandle into the Seed's prelude.
    • [BREAKING] Removed module next_tick.
    • Added method App::start (alternative to AppBuilder) (#376, #382).
    • Added trait GetElement + included in the prelude (alternative to MountPoint, used in AppStart).
    • Derive Debug for ElRef.
    • Added macros C! and IF! and helper not (#375).
    • Added trait ToClasses + included in the prelude.
    • ev accepts handlers that return Msg, Option<Msg> or () (#394).
    • [BREAKING] EventHandler::new accepts only handlers that return Option<Msg>.
    • [BREAKING] ev-like functions and some Orders method require 'static bound for generic types (temporary).
    • Orders::after_next_render now accepts callbacks that return Msg, Option<Msg> or ().
    • [deprecated] View is deprecated in favor of IntoNodes.
    • [BREAKING] View isn't implemented for El and Vec<El>.
    • [BREAKING] Node::add_listener renamed to add_event_handler.
    • Rewritten README.md.
    • Added new Fetch API module. See seed::browser::fetch (#353)
    • [deprecated] - seed::browser::service::fetch module is deprecated in favor of seed::browser::fetch.
    • Implemented IntoNodes for Option<Node<Msg>> and Option<Vec<Node<Msg>>>.
    • Implemented UpdateEl for i64 and u64.
    • Reset properties checked and value on attribute remove (#405).
    • Added examples markdown, tea_component, subscribe, custom_elements, fetch, url, pages, pages_hash_routing, pages_keep_state, auth, bunnies and graphql (#400).
    • Updated examples.
    • Removed examples app_builder, orders, server_interaction, counter_advanced and mathjax.
    • Example animation_frame renamed to animation.
    • Added base url handling + method Orders::clone_base+path (#369).
    • [BREAKING] Updated Url and routing.rs.
    • [deprecated] seed::browser::service::storage.
    • Added LocalStorage, SessionStorage and WebStorage (trait).
    • Added TouchEvent and touch_ev definitions.
    • Added DragEvent and drag_ev definitions.
    • [BREAKING] Renamed to_kbevent to to_keyboard_event.
    • [BREAKING] after_next_render returns RenderInfo.
    • web_sys, js_sys and wasm_bindgen + wasm_bindgen::JsCast included in prelude.
    • Added WebSocket + related items (#8).
    • Exposed App::mailbox.
    • Added streams::backoff + updated websocket example.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Feb 5, 2020)

    • Implemented UpdateEl for Filter and FilterMap.
    • Added method El::is_custom(&self).
    • Fixed custom elements patching (#325).
    • Removed unnecessary error message for comment nodes.
    • [BREAKING] Removed deprecated update and trigger_update_ev.
    • [BREAKING] Removed the remains of lifecycle hooks.
    • Fixed value and checked setting for input elements (a bug in VirtualDOM patch algorithm).
    • [BREAKING] Removed unpredictable internal input listeners - Seed will not longer react to external input value changes.
    • [BREAKING] Use EventHandler instead of Listener. (Listener is now used as the internal DOM EventListener representation.)
    • [deprecated] - raw_ev is deprecated in favor of ev. Functionality is the same.
    • Improved performance - rewritten event-handling and other refactors in VirtualDOM.
    • Fixed processing of multiple event-handlers (#138).
    • Added DOM Element references - see ElRef and examples (canvas, user_media or todomvc) (#115).
    • Removed Ms: Clone restriction as much as possible.
    • [BREAKING] Added or changed Custom variant from Custom(String) to Custom(Cow<'static, str>) in Ev, Tag, At and St. Use function from to create custom entities (e.g. At::from("my-attribute")) (#208).
    • Added macro nodes!. It accepts Node<Msg> and Vec<Node<Msg, returns flattened Vec<Node<Msg>.
    • Refactored all examples.
    • Fixed and rewritten example todomvc.
    • Renamed counter example to counter_advanced.
    • Renamed drop example to drop_zone.
    • Removed server_interaction_detailed example.
    • Added a new simpler counter example.
    • Changed example in the main README.md.
    • Added flag #![forbid(unsafe_code)] so the Seed will be marked as a safe library by the Rust community tools.
    • Removed clone restriction from the method Effect::map_msg.
    • Implemented UpdateEl for FlatMap.
    • Adapted to Rust 1.41.0.
    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Dec 29, 2019)

    • [BREAKING] MessageMapper::map_message changed to MessageMapper::map_msg.
    • [BREAKING] fetch and storage moved to seed::browser::service::{fetch, storage}, but reimported at the lib level. Ie: seed::fetch, and seed::storage.
    • Added support for Vec<Attr> and Vec<Style> in view macros.
    • App included in prelude.
    • [BREAKING] Seed refactored to use async/.await. fetch.rs docs updated.
    • Export Attrs, Style, Listener. ie, can import with seed::Style etc.
    • Fixed a bug causing the docs not to build.
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Dec 4, 2019)

    • Added helper seed::canvas(), and seed::canvas_context() helper functions.
    • Fixed Url parsing (resolves issue with hash routing).
    • [BREAKING] From<String> for Url changed to TryFrom<String> for Url.
    • Fixed jumping cursor in inputs (#158) .
    • Added method orders.after_next_render(Option<RenderTimestampDelta>) (#207).
    • Fixed a bug with back/forward routing to the landing page (#296).
    • Deprecated Init struct, replacing it with BeforeMount and AfterMount structs to better denote state before and after mounting the App occurs.
    • Added a new function builder which replaces build as part of deprecating Init.
    • Added a new function build_and_start which replaces finish as part of deprecating Init.
    • Added IntoInitand IntoAfterMount traits. It is possible to use these in place of a closure or function to produce the corresponding Init and AfterMount structs.
    • Messages sent from IntoAfterMount will now be run after the routing message.
    • Added example app_builder.
    • events::Listener is included in prelude.
    • ()s have been replaced with structs - e.g. GMs = () => GMs = UndefinedGMs.
    • WindowEvents alias changed to WindowEventsFn for consistency with other *Fn.
    • Commented builder and helper methods.
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Sep 9, 2019)

    • Added more SVG At variants
    • Added the St enum, for style keys; similar to At
    • Improved ergonomics of add_child, add_attr, add_class, add_style, replace_text, and add_text, Node methods
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Jul 28, 2019)

    • ElContainer, imported in prelude, renamed to View. (Breaking)
    • Internal refactor of El: Now wrapped in Node, along with Empty and Text. Creation macros return Node(Element). (Breaking)
    • Changed the way special attributes like disabled, autofocus, and checked are handled (Breaking)
    • MessageMapper now accepts closures
    • Orders is a trait now instead of a struct. (Breaking)
    • Significant changes to MessageMapper
    • Orders has new methods, clone_app and msg_mapper which can allow access to app instance.
    • Added more SVG element macros
    • Several minor bux fixes
    • Examples updated to reflect these changes
    • Improvements to Fetch API, especially regarding error handling and deserialization
    Source code(tar.gz)
    Source code(zip)
  • 0.3.7(Jun 22, 2019)

    • routes now accepts Url instead of &Url (Breaking)
    • Improvements to fetch API
    • Added raw!, md!, and plain! macros that alias El::from_html, El::from_markdown, and El::new_text respectively
    • Attrs! and Style! macros can now use commas and whitespace as separators, in addition to semicolons
    • Fixed typos in a few attributes (Breaking)
    • Fixed a bug where an HTML namespace was applied to raw html/markdown elements
    • New conditional syntax added in class! macro, similar to Elm's classList
    • Listener now implements MessageMapper
    • El methods add_child, add_style, add_attr, and set_text now return the elements, allowing chaining
    • Fixed a bug with set_text. Renamed to replace_text. Added add_text, which adds a text node, but doesn't remove existing ones. Added add_class. (Breaking)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.6(Jun 9, 2019)

    • Fetch module and API heavily changed (breaking)
    • Added support for request​Animation​Frame, which improves render performance, especially for animations
    • Styles no longer implicitly add px. Added unit! macro in its place.
    • Map can now be used directly in elements, without needing to annotate type and collect (ie for child Elements, and Listeners)
    • Fixed a bug where empty elements at the top-level were rendering in the wrong order
    • Added an empty! macro, which is similar to seed::empty
    • Attributes and style now retain order
    Source code(tar.gz)
    Source code(zip)
  • v0.3.5(May 28, 2019)

  • 0.3.4(May 17, 2019)

    • The update fn now accepts a (new) Orders struct, and returns nothing. Renders occur implicitly, with the option to skip rendering, update with an additional message, or perform an asynchronous action. (Breaking)
    • .mount() now accepts elements. Deprecated .mount_el()
    • The log function and macro now support items which implement Debug
    • Removed deprecated routing::push_path function (breaking)
    Source code(tar.gz)
    Source code(zip)
  • 0.3.3(May 7, 2019)

  • 0.3.2(Apr 21, 2019)

  • v0.3.1(Apr 8, 2019)

    • Top level view functions now return Vec<El<Ms>> instead of El<Ms>, mounted directly to the mount point. (Breaking)
    • push_route() can now accept a Vec<&str>, depreciating push_path().
    • Fixed a bug where window events couldn't be enabled on initialization
    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Mar 13, 2019)

    • update function now takes a mutable ref of the model. (Breaking)
    • Update (update's return type) is now a struct. (Breaking)
    • Async, etc events are now handled through messages, instead of passing App through the view func. (breaking)
    • Fixed some bugs with empty elements
    • Internal code cleanup
    • Added commented-out release command to example build files
    • Added more tests
    Source code(tar.gz)
    Source code(zip)
  • 0.2.10(Mar 3, 2019)

    • Routing can be triggered by clicking any element containing a Href attribute with value as a relative link
    • Internal links no longer trigger a page refresh
    • Models no longer need to implement Clone
    • Fixed a bug introduced in 0.2.9 for select elements
    Source code(tar.gz)
    Source code(zip)
  • 0.2.9(Feb 25, 2019)

    • Added a RenderThen option to Update, which allows chaining update messages
    • Added a .model method to Update, allowing for cleaner recursion in updates
    • Improved controlled-comonent (sync fields with model) logic
    Source code(tar.gz)
    Source code(zip)
  • 0.2.8(Feb 19, 2019)

    • Reflowed El::from_html and El::from_markdown to return Vecs of Els, instead of wrapping them in a single span.
    • Improved support for SVG and namespaces
    • Added set_timeout wrapper
    Source code(tar.gz)
    Source code(zip)
  • 0.2.7(Feb 8, 2019)

  • 0.2.6(Feb 4, 2019)

  • 0.2.5(Feb 4, 2019)

    • Attributes and Events now can use At and Ev enums
    • Routing overhauled; modelled after react-reason. Cleaner syntax, and more flexible.
    • Input, Textarea, and Select elements are now "controlled" - they always stay in sync with the model.
    • index.html file updated in examples and quickstart to use relative paths, which fixes landing page routing
    Source code(tar.gz)
    Source code(zip)
  • 0.2.4(Jan 26, 2019)

    • Changed render func to use a new pattern (Breaking)
    • Default mount point added: "app" for element id
    • View func now takes a ref to the model instead of the model itself
    • Routing refactored; now works dynamically
    • Update function now returns an enum that returns Render or Skip, to allow conditional rendering (Breaking)
    • Elements can now store more than 1 text node.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.3(Jan 20, 2019)

    • Fixed a bug where initially-empty text won't update
    • Added more tests
    • Exposed web_sys Document and Window in top level of Seed create, with .expect
    • Modified build scripts to keep the wasm output name fixed at 'package', simplifying example/quickstart renames
    • Tests now work in Windows due to update in wasm-pack
    Source code(tar.gz)
    Source code(zip)
  • 0.2.2(Jan 7, 2019)

Murasaki is a Fast, Secure, and Reliable Webkit based web browser.

Murasaki is a Fast, Secure, and Reliable Webkit based web browser. Table of Contents Goals Status Usage License Goals Security: Be secure, and not com

Moon Laboratories 5 Nov 17, 2021
The simplest build-time framework for writing web apps with html templates and typescript

Encoped A build-time fast af tool to write static apps with html and TypeScript Features Template-based ESLint, Prettier and Rollup integration No ext

null 1 Dec 11, 2021
Rust / Wasm framework for building client web apps

Yew Rust / Wasm client web app framework Documentation (stable) | Documentation (latest) | Examples | Changelog | Roadmap | 简体中文文档 | 繁體中文文檔 | ドキュメント A

Yew Stack 25.8k Jan 2, 2023
Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

Actix 16.2k Jan 2, 2023
Silkenweb - A library for writing reactive single page web apps

Silkenweb A library for building reactive single page web apps. Features Fine grained reactivity using signals to minimize DOM API calls No VDOM. Call

null 85 Dec 26, 2022
A (flash) message framework for actix-web. A port to Rust of Django's message framework.

actix-web-flash-messages Flash messages for actix-web Web applications sometimes need to show a one-time notification to the user - e.g. an error mess

Luca Palmieri 31 Dec 29, 2022
Thruster - An fast and intuitive rust web framework

A fast, middleware based, web framework written in Rust

null 913 Dec 27, 2022
Perseus is a blazingly fast frontend web development framework built in Rust with support for major rendering strategies

Perseus is a blazingly fast frontend web development framework built in Rust with support for major rendering strategies, reactivity without a virtual DOM, and extreme customizability

arctic_hen7 1.2k Jan 8, 2023
Super Fast & High Performance minimalist web framework for rust

Super Fast & High Performance minimalist web framework for rust

null 6 Oct 12, 2022
Rust HTTP API Template using PostgreSQL, Redis, RabbitMQ, and Hexagonal Architecture

Rust Template HTTP API Rust API Template using PostgreSQL, Redis, RabbitMQ, and Hexagonal Architecture The following template provides a basic structu

Paulo Bressan 7 Jun 9, 2023
A Google-like web search engine that provides the user with the most relevant websites in accordance to his/her query, using crawled and indexed textual data and PageRank.

Mini Google Course project for the Architecture of Computer Systems course. Overview: Architecture: We are working on multiple components of the web c

Max 11 Aug 10, 2022
Ergonomic and modular web framework built with Tokio, Tower, and Hyper

axum axum is a web application framework that focuses on ergonomics and modularity. More information about this crate can be found in the crate docume

Tokio 7.9k Dec 31, 2022
A rust web framework with safety and speed in mind.

darpi A web api framework with speed and safety in mind. One of the big goals is to catch all errors at compile time, if possible. The framework uses

null 32 Apr 11, 2022
A full-featured and easy-to-use web framework with the Rust programming language.

Poem Framework A program is like a poem, you cannot write a poem without writing it. --- Dijkstra A full-featured and easy-to-use web framework with t

Poem Web 2.2k Jan 6, 2023
Implementation of the RealWorld backend API spec in Actix, Rust's powerful actor system and most fun web framework.

Actix codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API. ❗ (2021/05/13) This cod

Allen 475 Jan 2, 2023
Demo of Rust and axum web framework

Demo of Rust and axum web framework Demonstration of: Rust: programming language that focuses on reliability and stability. axum: web framework that f

Joel Parker Henderson 115 Dec 29, 2022
Grape is a REST-like API framework for Ruby

Grape is a REST-like API framework for Ruby. It's designed to run on Rack or complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily develop RESTful APIs. It has built-in support for common conventions, including multiple formats, subdomain/prefix restriction, content negotiation, versioning and much more.

Ruby Grape 9.7k Jan 2, 2023
Hirola is an opinionated web framework for that is focused on simplicity and predictability.

Hirola Hirola is an opinionated web framework for that is focused on simplicity and predictability. Goals Keep it simple. Most Rust web frameworks hav

null 27 Nov 3, 2022
Starter template for use with the Leptos web framework and Axum.

Leptos Axum Starter Template This is a template for use with the Leptos web framework and the cargo-leptos tool using Axum. Creating your template rep

Leptos 10 Mar 4, 2023