Init backend
This commit is contained in:
parent
5b07e503e7
commit
11bdf28d67
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,10 +1,2 @@
|
|||||||
# Generated by Cargo
|
|
||||||
# will have compiled files and executables
|
|
||||||
/target/
|
/target/
|
||||||
|
|
||||||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
|
||||||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
|
||||||
# These are backup files generated by rustfmt
|
|
||||||
**/*.rs.bk
|
|
||||||
|
55
Cargo.toml
55
Cargo.toml
@ -1,51 +1,6 @@
|
|||||||
[package]
|
[workspace]
|
||||||
authors = [
|
|
||||||
"Jovi Hsu <jv.hsu@outlook.com>"
|
members = [
|
||||||
|
"backend",
|
||||||
|
"frontend",
|
||||||
]
|
]
|
||||||
categories = ["wasm", "web-programming", "sslvpn"]
|
|
||||||
description = ""
|
|
||||||
edition = "2021"
|
|
||||||
keywords = ["yew", "wasm", "wasm-bindgen", "web", "sslvpn"]
|
|
||||||
license = "MIT"
|
|
||||||
name = "webgateway"
|
|
||||||
readme = "README.md"
|
|
||||||
version = "0.1.0"
|
|
||||||
repository = "https://www.github.com/HsuJv/webgateway"
|
|
||||||
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
crate-type = ["cdylib", "rlib"]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
wasm-bindgen = "^0.2"
|
|
||||||
yew = "0.18"
|
|
||||||
js-sys = "0.3.55"
|
|
||||||
web-sys = "0.3.55"
|
|
||||||
yew-router = "0.15"
|
|
||||||
# The `console_error_panic_hook` crate provides better debugging of panics by
|
|
||||||
# logging them with `console.error`. This is great for development, but requires
|
|
||||||
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
|
|
||||||
# code size when deploying.
|
|
||||||
console_error_panic_hook = { version = "0.1.6", optional = true }
|
|
||||||
# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
|
|
||||||
# compared to the default allocator's ~10K. It is slower than the default
|
|
||||||
# allocator, however.
|
|
||||||
wee_alloc = { version = "0.4", optional = true }
|
|
||||||
|
|
||||||
[features]
|
|
||||||
default = ["console_error_panic_hook", "wee_alloc"]
|
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
wasm-bindgen-test = "0.3.13"
|
|
||||||
|
|
||||||
[profile.dev]
|
|
||||||
panic = "unwind"
|
|
||||||
opt-level = 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
panic = 'abort'
|
|
||||||
codegen-units = 1
|
|
||||||
opt-level = 's'
|
|
||||||
lto = true
|
|
29
backend/Cargo.toml
Normal file
29
backend/Cargo.toml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[package]
|
||||||
|
authors = [
|
||||||
|
"Jovi Hsu <jv.hsu@outlook.com>"
|
||||||
|
]
|
||||||
|
categories = ["wasm", "web-programming", "sslvpn"]
|
||||||
|
description = ""
|
||||||
|
edition = "2021"
|
||||||
|
keywords = ["yew", "wasm", "wasm-bindgen", "web", "sslvpn"]
|
||||||
|
license = "GPL3"
|
||||||
|
name = "webgateway-be"
|
||||||
|
readme = "README.md"
|
||||||
|
version = "0.1.0"
|
||||||
|
repository = "https://www.github.com/HsuJv/webgateway"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
panic = "unwind"
|
||||||
|
opt-level = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
panic = 'abort'
|
||||||
|
codegen-units = 1
|
||||||
|
opt-level = 's'
|
||||||
|
lto = true
|
3
backend/src/main.rs
Normal file
3
backend/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
10
frontend/.gitignore
vendored
Normal file
10
frontend/.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Generated by Cargo
|
||||||
|
# will have compiled files and executables
|
||||||
|
/target/
|
||||||
|
|
||||||
|
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
||||||
|
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
||||||
|
Cargo.lock
|
||||||
|
|
||||||
|
# These are backup files generated by rustfmt
|
||||||
|
**/*.rs.bk
|
51
frontend/Cargo.toml
Normal file
51
frontend/Cargo.toml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
[package]
|
||||||
|
authors = [
|
||||||
|
"Jovi Hsu <jv.hsu@outlook.com>"
|
||||||
|
]
|
||||||
|
categories = ["wasm", "web-programming", "sslvpn"]
|
||||||
|
description = ""
|
||||||
|
edition = "2021"
|
||||||
|
keywords = ["yew", "wasm", "wasm-bindgen", "web", "sslvpn"]
|
||||||
|
license = "GPL3"
|
||||||
|
name = "webgateway-fe"
|
||||||
|
readme = "README.md"
|
||||||
|
version = "0.1.0"
|
||||||
|
repository = "https://www.github.com/HsuJv/webgateway"
|
||||||
|
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["cdylib", "rlib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
wasm-bindgen = "^0.2"
|
||||||
|
yew = "0.18"
|
||||||
|
js-sys = "0.3.55"
|
||||||
|
web-sys = "0.3.55"
|
||||||
|
yew-router = "0.15"
|
||||||
|
# The `console_error_panic_hook` crate provides better debugging of panics by
|
||||||
|
# logging them with `console.error`. This is great for development, but requires
|
||||||
|
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
|
||||||
|
# code size when deploying.
|
||||||
|
console_error_panic_hook = { version = "0.1.6", optional = true }
|
||||||
|
# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
|
||||||
|
# compared to the default allocator's ~10K. It is slower than the default
|
||||||
|
# allocator, however.
|
||||||
|
wee_alloc = { version = "0.4", optional = true }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["console_error_panic_hook", "wee_alloc"]
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
wasm-bindgen-test = "0.3.13"
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
panic = "unwind"
|
||||||
|
opt-level = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
panic = 'abort'
|
||||||
|
codegen-units = 1
|
||||||
|
opt-level = 's'
|
||||||
|
lto = true
|
@ -1,6 +1,6 @@
|
|||||||
mod app;
|
mod app;
|
||||||
mod utils;
|
|
||||||
mod pages;
|
mod pages;
|
||||||
|
mod utils;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
use wasm_bindgen::JsCast;
|
use wasm_bindgen::JsCast;
|
Loading…
Reference in New Issue
Block a user