-
Notifications
You must be signed in to change notification settings - Fork 30
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
Template: Extend it to include more capabilities #368
Comments
I think The thing is: For example, while I was crafting my WasmIO demo, I did: slight new -n [email protected] rust && cd wasmio-demo
cd wit && slight add [email protected] |
I guess my main point is that the current
This isn't a great experience imo. |
I agree that users might not always want Also, I think our current template does have the slight macro dependency already added to the |
this sounds good to me. I will be working on a http-server-rust template for http-server template. Another concern of mine is how we can maintain the templates - each time we bump up the CLI version, we will have to bump up the version used in the templates. Any mistakes in this process would cause a re-deployment. Can we somehow make the dep versions in the templates aligned with CLI version automatically? |
Describe the solution you'd like
Currently when I do
slight new -n [email protected] rust
, it will create a rust bin program that has amain.rs
and some code to use the keyvalue capability. This is great to get people start using slight right away, but also lack significantly for other use cases. For example, a common use case for slight is to set up a HTTP server and handles HTTP requests usinghttp-server
capability. In order to create one application like this, I need to manually edit Cargo.toml to include[lib]
section and renamemain.rs
tolib.rs
in order to use the WASI reactor model.Solution
We want
slight new
to not only take a programming language name like C or Rust, but also a capability / service. This means we would maintain a 3D matrix of capability name, service name and language name to get people started with creating slight applications.slight new -n spidey -l rust -c http-server -v 0.4.0
orslight new -n spidey -l rust -c keyvalue -s redis -v 0.4.0
The above two command examples show how users can create different slight application with one simple command.
Alternatively
We could build a CLI that asks user questions on what kind of project they want to get started, and use all the answers to build a templated project for them .
Additional context
The text was updated successfully, but these errors were encountered: