-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The next variable (framework_cards) will be referenced few times below 😃
let framework_cards =
todo-mvc-bench/bin/src/framework_card.rs
Lines 251 to 473 in a47704d
| pub fn all_cards() -> Vec<FrameworkCard> { | |
| vec![ | |
| FrameworkCard::new( | |
| "mogwai 0.1", | |
| "frameworks/mogwai-0.1/index.html", | |
| &[ | |
| ("language", "rust"), | |
| ("version", "0.1.5"), | |
| ("has vdom", "no"), | |
| ], | |
| true, | |
| CreateTodoMethod::Change, | |
| ), | |
| FrameworkCard::new( | |
| "mogwai 0.2", | |
| "frameworks/mogwai/index.html", | |
| &[ | |
| ("language", "rust"), | |
| ("version", "0.2.0"), | |
| ("has vdom", "no"), | |
| ], | |
| true, | |
| CreateTodoMethod::Change, | |
| ), | |
| FrameworkCard::new( | |
| "sauron", | |
| "frameworks/sauron/index.html", | |
| &[ | |
| ("language", "rust"), | |
| ("version", "0.20.3"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeypress, | |
| ), | |
| FrameworkCard::new( | |
| "yew", | |
| "frameworks/yew-0.10/index.html", | |
| &[ | |
| ("language", "rust"), | |
| ("version", "0.10.0"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeypress, | |
| ), | |
| FrameworkCard::new( | |
| "Backbone", | |
| "frameworks/backbone/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "1.1.2"), | |
| ("has vdom", "no"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeypress, | |
| ), | |
| FrameworkCard::new( | |
| "Asterius", | |
| "frameworks/asterius/index.html", | |
| &[ | |
| ("language", "haskell"), | |
| ("version", "0"), | |
| ("has vdom", "no"), | |
| ], | |
| false, | |
| CreateTodoMethod::InputAndKeypress, | |
| ), | |
| FrameworkCard::new( | |
| "Ember", | |
| "frameworks/emberjs/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "1.4"), | |
| ("has vdom", "?"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeyup, | |
| ), | |
| FrameworkCard::new( | |
| "Angular", | |
| "frameworks/angularjs-perf/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "1.5.3"), | |
| ("has vdom", "no"), | |
| ], | |
| true, | |
| CreateTodoMethod::Submit, | |
| ), | |
| FrameworkCard::new( | |
| "Mithril", | |
| "frameworks/mithril/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "0.1.0"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeypress, | |
| ), | |
| FrameworkCard::new( | |
| "Mithril2", | |
| "frameworks/mithril-2/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "2.0.4"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeypress, | |
| ), | |
| FrameworkCard::new( | |
| "Elm", | |
| "frameworks/elm17/index.html", | |
| &[ | |
| ("language", "elm"), | |
| ("version", "0.17"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "Preact", | |
| "frameworks/preact/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "8.1.0"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "vanilla", | |
| "frameworks/vanilla-es6/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "none"), | |
| ("has vdom", "no"), | |
| ], | |
| false, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "Ractive", | |
| "frameworks/ractive/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "0.3.9"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "Knockout", | |
| "frameworks/knockoutjs/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "3.1.0"), | |
| ("has vdom", "no"), | |
| ], | |
| false, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "Vue", | |
| "frameworks/vue/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "1.0.24"), | |
| ("has vdom", "yes"), | |
| ], | |
| false, | |
| CreateTodoMethod::Change, | |
| ), | |
| FrameworkCard::new( | |
| "Mercury", | |
| "frameworks/mercury/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "3.1.7"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "React", | |
| "frameworks/react/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "15.0.2"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "Om", | |
| "frameworks/om/index.html", | |
| &[ | |
| ("language", "clojurescript"), | |
| ("version", "0.5"), | |
| ("has vdom", "yes"), | |
| ], | |
| true, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| FrameworkCard::new( | |
| "choo", | |
| "frameworks/choo/index.html", | |
| &[ | |
| ("language", "javascript"), | |
| ("version", "1.3.0"), | |
| ("no vdom", "still diffs"), | |
| ], | |
| false, | |
| CreateTodoMethod::InputAndKeydown, | |
| ), | |
| ] |
We can manually count and update the sizes of binary files of frameworks into framework_cards.
But I think it's better to have a build.rs to collect the sizes automatically. And if we do this - having a build.rs, then I propose to create files named: attributes.ron in each frameworks/<framework_name>/ folders. Move the content of framework_cards into these files. Then in the build.rs, we collect the the sizes from binary files, parse attributes from attributes.ron then construct framework_cards.
What do you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels