Commit Graph

345 Commits

Author SHA1 Message Date
Joshua Yanovski
2dd7089e52 Bring vek up to date so we can bump rustc (hopefully). 2021-03-04 05:46:59 +01:00
Sam
3d57db9485 Test fix for torvus 2021-02-23 14:38:58 -05:00
ccgauche
4b1c033f6e Added scopeguard to protect against unwind 2021-02-23 13:58:13 +01:00
ccgauche
267e7d8b4c Finalized Retrieve API 2021-02-22 23:59:41 +01:00
ccgauche
06aa7ab70c Retrieves added + New ECS memory layout for plugins 2021-02-22 23:59:32 +01:00
ccgauche
1597fcc79e Fixed the plugin compilation and added comments
TODO: Remove compilation errors on WASM side (while using common).
2021-02-22 23:59:25 +01:00
Marcel Märtens
3f5c64bec0 Client::new can now resolve DNS requests, better networking error messages 2021-02-22 17:35:19 +01:00
Marcel Märtens
514d5db038 Update Network Protocol
- now last digit version is compatible 0.6.0 will connect to 0.6.1
 - the TCP DATA Frames no longer contain START field, as it's not needed
 - the TCP OPENSTREAM Frames will now contain the BANDWIDTH field
 - MID is not Protocol internal

Update network
 - update API with Bandwidth

Update veloren
 - introduce better runtime and `async` things that are IO bound.
 - Remove `uvth` and instead use `tokio::runtime::Runtime::spawn_blocking`
 - remove futures_execute from client and server use tokio::runtime::Runtime instead
 - give threads a Name
2021-02-22 17:34:55 +01:00
Caelan
82c33d9ccb Backdate coreaudio-sys for OSX cross toolchain compatibility
See https://github.com/RustAudio/coreaudio-sys/issues/48
2021-02-19 15:46:36 -08:00
Marcel Märtens
03af9937cf Stabelize Network again:
- completly switch to Bytes, even in api. speed up TCP by fak 2
 - improve benchmarks
 - speed up mpsc metrics
 - gracefully handle shutdown by interpreting Ok(0) as tokio::tcpstream closed now.
 - fix hotloop in participants by adding `Some(n)` to fix endless handing.
 - fix closing bug by closing streams after `recv_mgr` is shutdown even if now shutdown is triggered locally.
 - fix prometheus
 - no longer throw when a `Stream` is dropped while participant still receives a msg for it.
 - fix the bandwith handling, TCP network send speed is up to 1.5GiB/s while recv is 150MiB/s
 - add documentation
 - tmp require rt-multi-threaded in client for tokio, to not fail cargo check

this is prob stable, i tested over 1 hour.
after that some optimisations in priomgr.
and impl. propper bandwith.
Speed is up to 2GB/s write and 150MB/s recv on a single core

sync add documentation
2021-02-17 19:37:48 +01:00
Marcel Märtens
ea8ab1ce7a Great improvements to the codebase:
- better logging in network
 - we now notify the send of what happened in recv in participant.
 - works with veloren master servers
 - works in singleplayer, using a actual mid.
 - add `mpsc` in whole stack incl tests
 - speed up internal read/write with `Bytes` crate
 - use `prometheus-hyper` for metrics
 - use a metrics cache
2021-02-17 16:15:00 +01:00
Marcel Märtens
9884019963 COMPLETE REDESIGN of network crate
- Implementing a async non-io protocol crate
    a) no tokio / no channels
    b) I/O is based on abstraction Sink/Drain
    c) different Protocols can have a different Drain Type
       This allow MPSC to send its content without splitting up messages at all!
       It allows UDP to have internal extra frames to care for security
       It allows better abstraction for tests
       Allows benchmarks on the mpsc variant
       Custom Handshakes to allow sth like Quic protocol easily
 - reduce the participant managers to 4: channel creations, send, recv and shutdown.
   keeping the `mut data` in one manager removes the need for all RwLocks.
   reducing complexity and parallel access problems
 - more strategic participant shutdown. first send. then wait for remote side to notice recv stop, then remote side will stop send, then local side can stop recv.
 - metrics are internally abstracted to fit protocol and network layer
 - in this commit network/protocol tests work and network tests work someway, veloren compiles but does not work
 - handshake compatible to async_std
2021-02-17 12:39:47 +01:00
Marcel Märtens
5aa1940ef8 get rid of async_std::channel
switch to `tokio` and `async_channel` crate.
I wanted to do tokio first, but it doesnt feature Sender::close(), thus i included async_channel
Got rid of `futures` and only need `futures_core` and `futures_util`.

Tokio does not support `Stream` and `StreamExt` so for now i need to use `tokio-stream`, i think this will go in `std` in the future

Created `b2b_close_stream_opened_sender_r` as the shutdown procedure does not need a copy of a Sender, it just need to stop it.

Various adjustments, e.g. for `select!` which now requieres a `&mut` for oneshots.

Future things to do:
 - Use some better signalling than oneshot<()> in some cases.
 - Use a Watch for the Prio propergation (impl. it ofc)
 - Use Bounded Channels in order to improve performance
 - adjust tests coding

bring tests to work
2021-02-17 12:38:53 +01:00
Marcel Märtens
1b77b6dc41 Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
Caelan
dda4931f46 Clean and update dependencies
* Remove tweak feature
 * Remove const-tweaker
 * Update tiny_http
 * Update bitvec to 0.21.0
 * Downgrade euc to avoid conflict with vek 0.12.0
 * Require exactly vek 0.12.0
 * Update all other dependencies automatically based on these changes
 * Update gilrs to latest at the request of Ada Lovegirls
 * Update meshing benchmarks to new criterion API
2021-02-17 01:27:06 -08:00
Joshua Barretto
4d19308612 Merge branch 'lboklin/quat-ori' into 'master'
Redefine Ori as a quaternion

See merge request veloren/veloren!1755
2021-02-16 22:39:11 +00:00
Lippy13
23d2a7ca10 Fix compile error under Windows 2021-02-10 03:38:01 +00:00
Ludvig Böklin
582ddfc3cd Ori: add tests, rename to_vec() => look_vec(); Dir: add methods, normalize on rot 2021-02-09 13:52:03 +01:00
Imbris
357cb26e05 Update native_dialog to 0.5.2 2021-02-07 00:48:57 -05:00
James Melkonian
1d8496ea21 Move agent system to server 2021-02-06 06:15:25 +00:00
jiminycrick
8b97199245 Update rand dependency 2021-01-26 20:35:08 -08:00
Imbris
adaea096d2 Update winit and iced 2021-01-23 01:09:33 -05:00
Acrimon
b464a1876e
update itertools for voxygen 2021-01-20 16:00:08 +01:00
Acrimon
9f16a946ee
update a few deps 2021-01-20 15:53:58 +01:00
Ben Wallis
aef2637288 Refactored loadout to have public functions for each slot instead of requiring callers to use the _INDEX consts 2021-01-08 19:12:09 +00:00
ccgauche
885c0b3b2c Update lock 2021-01-08 16:57:29 +01:00
Joshua Barretto
1604616768 Merge branch 'ccgauche/new-wasmer-backend' into 'master'
ccgauche/new wasmer backend

See merge request veloren/veloren!1644
2021-01-08 08:48:31 +00:00
ccgauche
06ffe61219 Added feature flag
changed field name to size
2021-01-08 08:48:30 +00:00
Joshua Barretto
a4b9230f03 fixed Cargo.lock conflict
Fixed `crossbeam-queue` being referenced  twice in the lockfile
2021-01-07 20:25:12 +00:00
jiminycrick
aceac9e205 Upgrade noise eliminating old rand dependency 2021-01-05 10:10:47 -08:00
Acrimon
e76474463a
update authc 2020-12-28 16:42:40 +01:00
Benoît du Garreau
989683d2d3 Improve world::Index 2020-12-17 12:08:04 +01:00
Benoît du Garreau
0cf164f33a Use assets_manager to load assets 2020-12-17 12:06:07 +01:00
Marcel Märtens
e8003a44dd update specs 2020-12-16 14:31:16 +01:00
Marcel Märtens
a1b50a86c4 update guillotiere 2020-12-16 10:56:00 +01:00
Marcel Märtens
e3307344ab get rid of some insecure dependencies 2020-12-16 10:42:36 +01:00
Marcel Märtens
107fd432f5 update further crates 2020-12-16 08:56:21 +01:00
Marcel Märtens
26918d10c9 update chrossbeam, tracy, prometheus (and reduce server deps to crossbeam-channel) 2020-12-16 00:51:07 +01:00
Joshua Barretto
f8c8e342e6 Moved common networking code to common/net, clippy fixes 2020-12-13 17:23:45 +00:00
Joshua Barretto
027842f832 Resolved plugin dependency cycle, allowing more interesting plugin API 2020-12-13 17:15:33 +00:00
Joshua Barretto
780f54ac90 Reorganised plugin crates 2020-12-13 17:15:32 +00:00
ccgauche
c95f57cafd Fixed comments
- Would be better to remove the iterator and just collect with a loop to avoid extra allocations
 - tructure
 - A HashSet is probably better
 - Usefull -> Useful
 - I'd have thought plugin-api-derive is a better name
2020-12-13 17:14:39 +00:00
ccgauche
ee7fb990c3 Added plugin system
Added a plugin system based on wasmer-runtime
 - Support Action (Print handled)
 - Support Events (PluginLoadEvent handled)
2020-12-13 17:14:37 +00:00
Joshua Barretto
12b29ea174 Began work on plugin API and plugin loading 2020-12-13 17:13:57 +00:00
Marcel Märtens
eba3532386 move tools and chat-cli in src/bin and examples 2020-12-12 02:12:00 +01:00
Marcel Märtens
534f083b08 get rid of insecure dependency completly 2020-12-11 16:13:57 +01:00
Ben Wallis
81a8ee0c19 Changed logging to use termcolor crate to fix ansi control codes showing when run under Windows Command Prompt 2020-12-06 14:49:13 +00:00
James Melkonian
71303fecfd Aura System and Campfire Health Regen 2020-12-04 22:24:56 +00:00
Marcel Märtens
e398cca53c move common_state into common_sys 2020-12-01 13:46:28 +01:00
Marcel Märtens
add7922653 Move Systems out of common into common_sys
This requires to move `State` into a own crate called `common_state` which depends on `common` and `common_sys`
2020-12-01 13:44:07 +01:00