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

Browser cfg, smaller WASM, VPN and HTTPS redirect #4115

Merged
merged 65 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
3b70882
Merge branch 'master' into asynchronous-io
john-sharratt Jun 30, 2023
588812c
Added ignore rules on vendored dependencies
john-sharratt Jun 30, 2023
5d5ce35
Merge branch 'asynchronous-io' of github.com:wasmerio/wasmer into asy…
john-sharratt Jun 30, 2023
a016171
Added dependencies needed for VPN functionality
john-sharratt Jul 1, 2023
684c152
Added placeholders for VPN
john-sharratt Jul 1, 2023
e40ba24
Merge branch 'asynchronous-io-with-fs-fixes' into vpn
john-sharratt Jul 1, 2023
b89df93
Merge branch 'vpn' into tun-tap
john-sharratt Jul 1, 2023
01ffc81
Added the metadata and client for remote networking
john-sharratt Jul 1, 2023
7a55380
Shutdown does not need to be public
john-sharratt Jul 1, 2023
a98deb5
Finished the client side of the VPN
john-sharratt Jul 6, 2023
0ffa79b
Completed the server side of the remote networking
john-sharratt Jul 10, 2023
cfcd7b7
Changed the feature flags
john-sharratt Jul 12, 2023
b8eab94
Updated cargo.lock
john-sharratt Jul 16, 2023
1151f93
Merge branch 'asynchronous-io-with-fs-fixes' into tun-tap
john-sharratt Jul 16, 2023
0045034
Fixed the tokio dependencies on remote
john-sharratt Jul 16, 2023
a175270
Added the TunTap adapter
john-sharratt Jul 17, 2023
0bf4bfc
Checking in the code for now
john-sharratt Jul 17, 2023
a9942a1
Tuntap device now has a plumbed in remote networking
john-sharratt Jul 17, 2023
86802a8
Added a connect command
john-sharratt Jul 17, 2023
ebe22a0
Renamed two of the projects so they can be externally referenced
john-sharratt Jul 17, 2023
5c5f7ec
Fixed an issue with the borrow checker on async calls to remote netwo…
john-sharratt Jul 18, 2023
e816d66
Finished the main client and server setup and added unit tests
john-sharratt Jul 18, 2023
558d41b
Added more serialization formats
john-sharratt Jul 18, 2023
4ffd1e7
Renamed the construction methods
john-sharratt Jul 18, 2023
83ca434
Fixed some compile errors after the virtual-net changes
john-sharratt Jul 19, 2023
e530298
Added support for hyper web socket with virtual-net
john-sharratt Jul 20, 2023
a4f5b42
Bit more refactoring of the packages and implemented more channels
john-sharratt Jul 20, 2023
983f752
Merge branch 'master' into tun-tap
john-sharratt Jul 22, 2023
57d7ab9
Converted some sync operations to async operations
john-sharratt Jul 24, 2023
cab8716
Fixed multiple bugs with the remote networking packet send and recv p…
john-sharratt Jul 24, 2023
30acca8
Reduced the warning level on channel closing for VPN sessions
john-sharratt Jul 25, 2023
30e52be
Merge branch 'master' into tun-tap
john-sharratt Jul 26, 2023
deac05c
Fixed a linting issue due to some commented code
john-sharratt Jul 26, 2023
38b85fa
Added a forced shutdown on tokio runtimes as the STDIN blocks the shu…
john-sharratt Jul 26, 2023
38d35f8
Linting fixes
john-sharratt Jul 26, 2023
8acb194
More lint fixes and a compilation fix for c_api
john-sharratt Jul 26, 2023
7941eb9
Made prepare_runtime backwards compatible
john-sharratt Jul 26, 2023
9fdb2c1
wasmer-sh now takes a configuration file and auto redirects http to h…
john-sharratt Jul 27, 2023
ba9b5c6
Optimized the build tests and build sizes
john-sharratt Jul 27, 2023
b383a74
Development mode no longer attaches all the debug info
john-sharratt Jul 27, 2023
2713944
Preparing another release
john-sharratt Jul 27, 2023
7b3ccb3
Released new version of wasmer.sh
john-sharratt Jul 27, 2023
46623a8
Added a cors configuration for the CDN
john-sharratt Jul 27, 2023
2541641
Merge branch 'tun-tap' into browser-cfg-with-tun-tap
john-sharratt Jul 28, 2023
bff2d8c
Fixed up a couple of problems with the init.js config bootstrap
john-sharratt Jul 28, 2023
efa6a80
Disabled asynchronous threading
john-sharratt Jul 28, 2023
e7ac25b
Switched to the old http server for now
john-sharratt Jul 28, 2023
f72fd33
Removed additional dependencies
john-sharratt Jul 28, 2023
c67720c
Publishing a new version
john-sharratt Jul 28, 2023
62e4758
Fixed the init.json file
john-sharratt Jul 30, 2023
fbc4958
Another release of wasmer.sh
john-sharratt Jul 30, 2023
8b52814
Releasing another version
john-sharratt Jul 30, 2023
7e1d386
Virtual net is now a dependency for wasmer-sh
john-sharratt Jul 30, 2023
05151a9
Added virtual networking to the browser
john-sharratt Jul 30, 2023
abdb3c0
Fixed a series of lint issues
john-sharratt Jul 31, 2023
d229abe
Remove python from the main package
john-sharratt Jul 31, 2023
f8a781f
Updates to the wasi-web package
john-sharratt Jul 31, 2023
032f29d
Merge branch 'master' into browser-cfg-with-tun-tap
john-sharratt Jul 31, 2023
da0f271
Merge branch 'fix-for-inheritance' into browser-cfg-with-tun-tap
john-sharratt Jul 31, 2023
a225f47
Better error message when including broken packages
john-sharratt Jul 31, 2023
fab2a0e
Fixed an issue where undefined uses field would break wasmer-sh
john-sharratt Jul 31, 2023
b7f4557
Fixed linter
ptitSeb Aug 1, 2023
416cdfb
Merge branch 'master' into browser-cfg-with-tun-tap
ptitSeb Aug 1, 2023
bd5f111
Merge branch 'master' into browser-cfg-with-tun-tap
ptitSeb Aug 2, 2023
7941653
Merge remote-tracking branch 'origin/master' into browser-cfg-with-tu…
Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
383 changes: 298 additions & 85 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ impl Args {
Some(Cmd::Init(init)) => init.execute(),
Some(Cmd::Login(login)) => login.execute(),
Some(Cmd::Publish(publish)) => publish.execute(),
/*
Some(Cmd::Connect(connect)) => connect.execute(),
*/
#[cfg(feature = "static-artifact-create")]
Some(Cmd::GenCHeader(gen_heder)) => gen_heder.execute(),
#[cfg(feature = "wast")]
Expand Down
2 changes: 2 additions & 0 deletions lib/virtual-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ tracing = "0.1"
mio = { version = "0.8", features = [ "os-poll" ], optional = true }
socket2 = { version = "0.4", optional = true }
derivative = { version = "^2" }
futures = { version = "0.3" }
serde = { version = "1.0", default-features = false, features = ["derive"] }

[features]
sys = [ "mio", "socket2" ]
3 changes: 2 additions & 1 deletion lib/virtual-io/src/interest.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use serde::{Deserialize, Serialize};
use std::{
collections::{HashMap, HashSet},
sync::{Arc, Mutex},
Expand All @@ -6,7 +7,7 @@ use std::{

use derivative::Derivative;

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Debug, Clone, Serialize, Deserialize, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum InterestType {
Readable,
Writable,
Expand Down
2 changes: 2 additions & 0 deletions lib/virtual-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ mod guard;
mod interest;
#[cfg(feature = "sys")]
mod selector;
pub mod waker;

#[cfg(feature = "sys")]
pub use guard::*;
pub use interest::*;
#[cfg(feature = "sys")]
pub use selector::*;
pub use waker::*;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct InlineWaker {
condvar: Condvar,
}
impl InlineWaker {
fn new() -> Arc<Self> {
pub fn new() -> Arc<Self> {
Arc::new(Self {
lock: Mutex::new(()),
condvar: Condvar::new(),
Expand All @@ -28,7 +28,7 @@ impl InlineWaker {
self.condvar.notify_all();
}

fn as_waker(self: &Arc<Self>) -> Waker {
pub fn as_waker(self: &Arc<Self>) -> Waker {
let s: *const Self = Arc::into_raw(Arc::clone(self));
let raw_waker = RawWaker::new(s as *const (), &VTABLE);
unsafe { Waker::from_raw(raw_waker) }
Expand Down
28 changes: 25 additions & 3 deletions lib/virtual-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,38 @@ thiserror = "1"
bytes = "1.1"
async-trait = { version = "^0.1" }
tracing = "0.1"
tokio = { version = "1", features = [ "net", "rt" ], default_features = false, optional = true }
tokio = { version = "1", default_features = false, optional = true }
libc = { version = "0.2.139", optional = true }
mio = { version = "0.8", optional = true }
socket2 = { version = "0.4", optional = true }
derivative = { version = "^2" }
virtual-mio = { path = "../virtual-io", version = "0.1.0", default-features = false }
base64 = "0.21"
bincode = { version = "1.3" }
serde = { version = "1.0", default-features = false, features = ["derive"] }
pin-project-lite = "0.2.9"
futures-util = { version = "0.3" }
anyhow = "1.0"
tokio-serde = { version = "0.8", features = [ "bincode" ], optional = true }
tokio-util = { version = "0.6", features = ["codec"], optional = true }
hyper-tungstenite = { version = "0.10", optional = true }
hyper = { version = "0.14", optional = true }
tokio-tungstenite = { version = "0.19", optional = true }

[dev-dependencies]
tokio = { version = "1", default_features = false, features = [ "macros" ] }
tracing-test = { version = "0.2" }

[features]
host-net = [ "tokio", "libc", "virtual-mio/sys", "tokio/net", "socket2", "mio" ]
default = [ "host-net", "remote", "json", "messagepack", "cbor", "hyper", "tokio-tungstenite" ]
host-net = [ "tokio", "libc", "tokio/io-util", "virtual-mio/sys", "tokio/net", "tokio/rt", "socket2", "mio" ]
remote = [ "tokio", "libc", "tokio/io-util", "tokio/sync", "tokio-serde", "tokio-util" ]
json = [ "tokio-serde/json" ]
messagepack = [ "tokio-serde/messagepack" ]
cbor = [ "tokio-serde/cbor" ]
hyper = [ "hyper-tungstenite", "dep:hyper" ]
tokio-tungstenite = [ "dep:tokio-tungstenite" ]

[package.metadata.docs.rs]
features = ["host-net"]
features = ["host-net", "remote"]
rustc-args = ["--cfg", "docsrs"]
Loading