Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Idea on extending the use case #47

Closed
cecton opened this issue Feb 20, 2021 · 6 comments
Closed

Idea on extending the use case #47

cecton opened this issue Feb 20, 2021 · 6 comments
Assignees

Comments

@cecton
Copy link
Member

cecton commented Feb 20, 2021

The heart of wasm-run is building and packaging rust wasm. Do we event want to extend it to cover this use case?

@fstephany can you detail more on this? I'm not following sorry 😓

@cecton
Copy link
Member Author

cecton commented Feb 20, 2021

I will put this one in this ticket here but I'm not sure it is related:

Shouldn't we separate the build of each components (backend, frontend, css)?

I'm not sure what you have in mind. Can you explain a bit more?

Do we need to support other use case with more components? Like two separate frontend (eg., one for the public version of the app and another for an admin side)?

You can do two separate frontends by adding commands if you want. I don't see why not.

@cecton
Copy link
Member Author

cecton commented Feb 20, 2021

$ cargo run --bin run
# does not start. It will loop forever displaying ``
# `Finished dev [unoptimized + debuginfo] target(s) in 0.03s`
# until the inotify limit is reached.
# Shouldn't we return an error if no arguments are passed? Or what is 
# supposed to do when no commands are given?

When no argument is passed it does serve.

The infinite loop is probably a bug. Maybe we watch a file that is being modified during the generation?

@fstephany
Copy link

The heart of wasm-run is building and packaging rust wasm. Do we event want to extend it to cover this use case?

@fstephany can you detail more on this? I'm not following sorry sweat

Oops yes, that was badly expressed. I meant that the name wasm-run implies that it is only good for building wasm frontends app while I see it more like a general bundler that takes wasm as a first class citizen.

Nothing to worry too much about here, sorry for the noise 😅

Shouldn't we separate the build of each components (backend, frontend, css)?

I'm not sure what you have in mind. Can you explain a bit more?

My reasoning was that we have hooks like pre_build and post_build. It might be useful to specify which build we are talking about: the wasm bundle, the server app or the sass bundle. Of course, the current hooks make a lot of sense when building a single page app and, as you said, it's always possible to add custom commands if necessary.

I still think that it could be valuable to support the main three components of a webapp: frontend, backend and css. I'll try to make a PR to play with it and try to express that.

@cecton
Copy link
Member Author

cecton commented Mar 3, 2021

FYI I found the issue with the infinite loop with the watcher. It will be fixed by #53

@fstephany
Copy link

We can close this as we've discussed a bit everywhere about those use cases 👍

@cecton
Copy link
Member Author

cecton commented Mar 4, 2021

Sure

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

No branches or pull requests

2 participants