Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary sizes and frameworks' details #41

Open
aclueless opened this issue May 12, 2020 · 1 comment
Open

Binary sizes and frameworks' details #41

aclueless opened this issue May 12, 2020 · 1 comment

Comments

@aclueless
Copy link
Contributor

The next variable (framework_cards) will be referenced few times below 😃
let framework_cards =

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?

@schell
Copy link
Owner

schell commented May 12, 2020

I like that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants