-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
735 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
body { | ||
background-color: #111216; | ||
} | ||
|
||
#main { | ||
margin: 0; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif | ||
} | ||
|
||
#links { | ||
width: 400px; | ||
text-align: left; | ||
font-size: x-large; | ||
color: white; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
#links a { | ||
color: white; | ||
text-decoration: none; | ||
margin-top: 20px; | ||
margin: 10px; | ||
border: white 1px solid; | ||
border-radius: 5px; | ||
padding: 10px; | ||
} | ||
|
||
#links a:hover { | ||
background-color: #1f1f1f; | ||
cursor: pointer; | ||
} | ||
|
||
#header { | ||
max-width: 1200px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "wasi-sol-example" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
console_error_panic_hook = "0.1.7" | ||
log = "0.4.21" | ||
wasi-sol = { path = "../../", features = ["dio"] } | ||
wasm-logger = "0.2.0" | ||
dioxus = { version = "0.5", features = ["web"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[application] | ||
|
||
# App (Project) Name | ||
name = "wasi-sol" | ||
|
||
# Dioxus App Default Platform | ||
# desktop, web | ||
default_platform = "web" | ||
|
||
# `build` & `serve` dist path | ||
out_dir = "dist" | ||
|
||
# resource (assets) file folder | ||
asset_dir = "assets" | ||
|
||
[web.app] | ||
|
||
# HTML title tag content | ||
title = "wasi-sol" | ||
|
||
[web.watcher] | ||
|
||
# when watcher trigger, regenerate the `index.html` | ||
reload_html = true | ||
|
||
# which files or dirs will be watcher monitoring | ||
watch_path = ["src", "assets"] | ||
|
||
# include `assets` in web platform | ||
[web.resource] | ||
|
||
# CSS style file | ||
|
||
style = [ "main.css" ] | ||
|
||
# Javascript code file | ||
script = [] | ||
|
||
[web.resource.dev] | ||
|
||
# Javascript code file | ||
# serve: [dev-server] only | ||
script = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 📚 WASI SOL Dioxus Phantom Component Example | ||
|
||
## 🛠️ Pre-requisites: | ||
|
||
1. Install [`rustup`](https://www.rust-lang.org/tools/install): | ||
|
||
```bash | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
``` | ||
|
||
1. Install [`Dioxus CLI`](https://dioxuslabs.com/learn/0.5/getting_started): | ||
|
||
```bash | ||
cargo install dioxus-cli | ||
``` | ||
|
||
1. Add Wasm target: | ||
|
||
```bash | ||
rustup target add wasm32-unknown-unknown | ||
``` | ||
|
||
## 🚀 Building and Running | ||
|
||
1. Fork/Clone the GitHub repository. | ||
|
||
```bash | ||
git clone https://github.com/gigadao/wasi-sol | ||
``` | ||
|
||
1. Navigate to the application directory. | ||
|
||
```bash | ||
cd wasi-sol/examples/dioxus | ||
``` | ||
|
||
1. Run the client: | ||
|
||
```sh | ||
dx serve --port 3000 | ||
``` | ||
|
||
Navigate to http://localhost:3000 to explore the landing page. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes
Oops, something went wrong.