Commit Graph

133 Commits

Author SHA1 Message Date
iceiix c7bdb60d85
CI enhancements: .app bundling, build .wasm (#486)
Updates to enhance GitHub Actions continuous integration:

* ci: add macOS app bundle packaging using cargo-bundle, closes #352 
based on https://github.com/EndlessSkyCommunity/ESLauncher2/blob/master/Cargo.toml
* ci: add web target, building using wasm-pack (for #446) 
* ci: refactor and cleanup targets, split out instead of using matrix

* main: save config in consistent OS-specific dirs::config_dir()
Instead of storing and loading in the current working directory, change
to a consistent dedicated configuration directory. This is necessary for
.app launching since cwd is set to /. To preserve compatibility with
existing installations, if conf.cfg exists in cwd then it will be used instead,
but otherwise we will use the operating system specific config dirs:
// Lin: Some(/home/alice/.config)
// Win: Some(C:\Users\Alice\AppData\Roaming)
// Mac: Some(/Users/Alice/Library/Application Support)

* macos: add icons based on screenshotted logo
* macos: add Cmd-Q to quit
2021-01-18 19:05:29 -08:00
dependabot-preview[bot] 2f08e14b1c
build(deps): bump rand from 0.8.1 to 0.8.2 (#473)
Bumps [rand](https://github.com/rust-random/rand) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.1...0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-15 16:41:07 -08:00
ice_iix bb4fb9eb8b Update byteorder, log, serde dependencies
Bump byteorder to 1.4.2, closes #470
Bump log to 0.4.13, closes #471
Bump serde to 1.0.119, closes #472
2021-01-12 19:13:21 -08:00
iceiix 8bd233c3db
Update reqwest, getrandom, rand (#464)
Update getrandom to 0.2.1. Closes #460
Update rand to 0.8.1. Closes #462
Update reqwest to 0.11.0. Closes #463
2021-01-07 17:29:09 -08:00
dependabot-preview[bot] 98bd7f004b
build(deps): bump serde_json from 1.0.60 to 1.0.61 (#456)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.60...v1.0.61)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-01 08:02:30 -08:00
iceiix 352f1965af
Update rand to 0.8.0, add getrandom js for web (#450)
* Add getrandom with js feature for JavaScript web compatibility

* Update to rand 0.8.0, closes #440

* Update to rand_pcg 0.3.0, closes #434

* Update rsa_public_encrypt_pkcs1 to 0.3.0, updates rand 0.8.0
2020-12-27 16:14:11 -08:00
iceiix 503a98d7a8
Use instant over std::time, for wasm compat (#449)
Replace std::time with the `instant` crate, which bridges to std::time on
native but on wasm calls performance.now() instead of panicking.

A step towards 🕸️ Web support #446

* logo: replace SystemTime/UNIX_EPOCH with Instant
2020-12-27 15:06:03 -08:00
iceiix b8b4cb07a7
Disable multisampled textures, glTexImage2DMultisample (#447)
Steven used multisampled textures from the beginning, but this caused
incompatibilities: https://github.com/Thinkofname/steven/issues/74.
Subsequently fixed by increasing the number of samples, but increasing
it beyond the limit caused more incompatibilities, so it was clamped to
the maximum samples reported as supported by the system.

Fast-forward to now, as part of adding WebGL support (#446), the use of
multisampled textures via the glTexImage2DMultisample() call is
unsupported on this platform. Replace the following:

* glTexImage2DMultisample -> glTexImage2D
* TEXTURE_2D_MULTISAMPLE -> TEXTURE_2D
* sampler2DMS -> sampler2D

This disables the custom multisampling anti-aliasing algorithm (MSAA)
implemented in the chunk fragment shader, increasing compatibility:

* Update to glow release, remove image_2d_sample()

MSAA may be added back at a later date using multisampled renderbuffers
instead, see #442.
2020-12-27 10:14:39 -08:00
iceiix 0471eb3a82 Use web-sys for web backend (#444)
A small step for #446 🕸️ Web support, use web-sys to interface to the web.
Previously, we would try to use glutin on the web, which is not supported;
now glutin is only used on native: fixes #171 could not find Context in platform_impl.

winit is still used on both, but the GL context is created with web-sys and glow
(on the web), and created with glutin and used with glow (on native). stdweb is
no longer used, being replaced by web-sys.

Substantial refactoring to allow reusing the code between web/native:

* settings: use VirtualKeyCode from winit, not reexported from glutin
* std_or_web: remove broken localstoragefs/stdweb, add File placeholder
* render: disable skin_thread on wasm since we don't have threads

* gl: use glow types in gl wrapper (integers in native, but Web*Key in web)
* gl: web-sys WebGlUniformLocation does not implement Copy trait, so glow::UniformLocation doesn't so gl::Uniform can't
* gl: refactor context initialization, pass glow::Context to gl::init for consistency between native/web
* gl: update to glow with panicking tex_image_2d_multisample web-sys wrapper

* glsl: use shader version in GLSL for WebGL 2 and OpenGL 3.2

* shaders: add explicit float/int type conversions, required for WebGL
* shaders: specify mediump precision, required for WebGL
* shaders: specify fragment shader output locations for WebGL

* main: refactor handle_window_event to take a winit window, not glutin context
* main: handle resize outside of handle_window_event since it updates the glutin window (the only event which does this)
* main: use winit events in handle_window_event not reexported glutin events
* main: refactor game loop handling into tick_all()
* main: create winit window for WebGL, and use winit_window from glutin
* main: restore console_error_panic_hook,  mistakingly removed in (#260)
* main: remove force setting env RUST_BACKTRACE=1, no longer can set env on web

* www: index.js: fix wasm import path
* www: npm update, npm audit fix
* www: update readme to link to status on #446 🕸️ Web support
2020-12-26 13:43:21 -08:00
iceiix 0aa062f4b8
Use glow, GL on Whatever (#262)
Replaces the use of gl_generator with the glow wrapper:

* Add glow dependency, based on glow 0.6.1

* Pin version of glow fork for https://github.com/iceiix/glow/pull/1 until #442 renderbuffer

* Remove gl module, steven_gl

Porting details:
* Initialize glow in src/gl/mod.rs
* Call gl methods on glow context
* glow uses camelcase
* Import glow::HasContext trait, finds draw_elements etc.
* Fix mismatched types, glow uses Option and &str instead of raw pointers
* Fix uniform_location, glow already returns Some(u32)
* uniform_location: convert i32 to u32 for Uniform
* Fix attribute_location
* Fix shader creation Result u32 type 
* Fix passing GLvoid and 2d/3d
* Fix missing Options type mismatches
* Offsets are i32 in glow, not GLvoid
* Fix clear_buffer using _f32_slice
* Delete methods are singular not plural
* glBufferData -> buffer_data_u8_slice
* buffer_sub_data_u8_slice
* Update more glow method wrapper names found by reviewing glow native platform
* Remove unused multi_draw_elements, can be replaced by draw_elements in a loop and it has no WebGL equivalent
* glow implements glMapBufferRange
* Remove unused read_buffer
* glow's deletes automatically pass 1 and take no reference
* shader_source() accepts &str directly; removes last of std::ptr
* Pass uniform Option<u32>
* Fix bool passing normalized parameter
* Fix draw_buffers parameter
* Stop unnecessarily returning context from gl::init
* Getting shader info is unsafe 
* Unwrapping static mut is unsafe
* Use unsafe raw pointers for global mutable context
* Fix initializing GL objects wrappers from glow wrappers
* Unbinding framebuffers uses None
* Uppercase global to fix warning
* Shaders return Some instead of None
* Unbox the context to a raw pointer
* Use tex_image_2d_multisample added in glow fork 
* Implement uniform_location, fixing unwrap None failed
* Add tex_sub_image_3d, using PixelUnpackData::Slice
* set_matrix4: transmute the Matrix4 since it is repr(C)
* get_pixels -> get_tex_image -> glGetTexImage, with PixelPackData::Slice
* Wrap sub_image_2d (glTexSubImage2D) and fix warnings
* Implement set_float_multi_raw and set_matrix4_multi, using from_raw_parts
2020-12-25 10:00:22 -08:00
iceiix 9bc10c1100
Update to glutin 0.26.0 + winit 0.24.0 (#334)
* Update for ModifiersChanged event

* Consistently use logical position and size

CursorMoved gives us a PhysicalPosition, which needs to be converted
to LogicalPosition to properly track the mouse movement. Change the
width/height passed to be a LogicalSize instead of a PhysicalPosition,
matching the LogicalPosition.
2020-12-20 08:18:39 -08:00
ice_iix 5d0fb7fa64 Update dependencies: reqwest, serde/json, structopt...
Closes #425 build(deps): bump wasm-bindgen from 0.2.68 to 0.2.69
Closes #426 build(deps): bump structopt from 0.3.20 to 0.3.21
Closes #427 build(deps): bump serde_json from 1.0.59 to 1.0.60
Closes #428 build(deps): bump serde from 1.0.117 to 1.0.118
Closes #433 build(deps): bump reqwest from 0.10.9 to 0.10.10
2020-12-19 17:48:13 -08:00
ice_iix f3faae383e Bump image to 0.23.12 (closes #422) 2020-11-24 19:02:18 -08:00
ice_iix da137ca9b4 Update deps: cfg-if, serde/_json, structopt...
Bump cfg-if to 1.0.0 (closes #412)
Bump serde to 1.0.117 (closes #416)
Bump serde_json to 1.0.59 (closes #413)
Bump structopt to 0.3.20 (closes #414)
Bump flate2 to 1.0.19 (closes #420)
Bump reqwest to 0.10.9 (closes #423)
2020-11-24 19:02:18 -08:00
ice_iix ab4600011d Update image and base64 dependencies
Closes #396 bump image from 0.23.6 to 0.23.10
Closes #404 bump base64 from 0.12.3 to 0.13.0
2020-10-10 12:39:44 -07:00
ice_iix d9399015cd Update deps: log, reqwest, serde_json, flate2, structopt...
Closes #372 bump log from 0.4.8 to 0.4.11
Closes #387 bump reqwest from 0.10.6 to 0.10.8
Closes #391 bump wasm-bindgen from 0.2.64 to 0.2.68
Closes #403 bump serde_json from 1.0.56 to 1.0.58
Closes #405 bump flate2 from 1.0.16 to 1.0.18
Closes #409 bump structopt from 0.3.15 to 0.3.19
2020-10-10 12:04:21 -07:00
ice_iix f5f61e071e Update flate2, serde_json, wasm-bindgen; +gl/protocol
Bump flate2 to 1.0.16, closes #350
Bump serde_json to 1.0.56, closes #349
Bump wasm-bindgen to 0.2.64, closes #348
gl: Bump libc to 0.2.71
protocol: Bump hex to 0.4.2
protocol: Bump aes to 0.4.0
protocol: Bump cfb8 to 0.4.0
protocol: Bump num-traits to 0.2.12
2020-07-05 08:45:34 -07:00
ice_iix 287fb3feca Update sha-1 dependency to 0.9.1. Closes #342
* Remove unused top-level sha-1 dependency since it was moved to the
protocol crate
2020-06-28 09:15:01 -07:00
ice_iix c167d70aea Update serde and base64 dependencies
Update to serde 1.0.114, closes #340
Update to base64 0.12.3, closes #341
2020-06-28 09:02:38 -07:00
ice_iix 41f8be6b90 Update to image 0.23.6, closes #333 2020-06-20 15:04:59 -07:00
iceiix a6bff21de8
Update to glutin 0.22.0 and winit 0.20.0 release (#268)
Thanks to @mwkroening (#317) and @martijnberger (#323) for helping fix this update.

* Update to glutin 0.22.0 and winit 0.20.0 release, removing alpha pinning

* scale_factor() replaces hidpi_factor()

* Listen for ScaleFactorChanged, separate from Resized event

* Fix getting physical size of window

* Fix logical mouse event coordinates
2020-06-20 13:55:45 -07:00
ice_iix 9b2147c895 Update structopt, base64, zip, serde_json, reqwest, flate2, byteorder
Update to structopt 0.3.15, closes #330
Update to base64 0.12.2, closes #329
Update to zip 0.5.6, closes #328
Update to serde_json 1.0.55, closes #327
Update to reqwest 0.10.6, closes #321
Update to flate2 1.0.14, closes #303
Update to byteorder 1.3.4, closes #285
2020-06-20 11:49:21 -07:00
ice_iix dece047cd7 Remove clipboard crate git dependency, back to 0.5.0
The git dependency was only for wasm32-unknown-emscripten support:
https://github.com/aweinstock314/rust-clipboard/pull/62
but #92 changes to using wasm32-unknown-unknown instead, a better
supported path (though still incomplete in this project, see #171)
2020-02-02 08:29:20 -08:00
ice_iix ed7f06b1a8 Update deps: serde_json, structopt, image, rand, num-traits, reqwest
Closes #276 Bump serde_json from 1.0.44 to 1.0.45
Closes #274 Bump structopt from 0.3.7 to 0.3.8
Closes #273 Bump image from 0.22.3 to 0.22.4
Closes #272 Bump rand from 0.7.2 to 0.7.3
Closes #270 Bump num-traits from 0.2.10 to 0.2.11
Closes #269 Bump reqwest from 0.10.0 to 0.10.1
2020-02-02 08:19:15 -08:00
ice_iix bda0009a6f Add Cargo.toml for new steven_protocol crate. Closes #167 (#278)
Completes the move of the protocol implementation into a new
crate, named steven_protocol, in the protocol/ subdirectory.

* Add Cargo.toml for steven_protocol

* Add steven_protocol entrypoint in protocol/src/lib.rs

* Use steven_protocol in main

* Remove protocol in main, replaced by steven_protocol

* Remove unused dependencies moved into steven_protocol
2020-02-02 07:47:11 -08:00
iceiix 87e0726f3f
blocks: split macro into multiple functions, fast! (#267)
Improves fix for #184, whereas #255 reduced optimizations,
we now address the underlying compiler limitation and split out
the one massive lazy_static! initialization function, into
one function per block in the block_registration_functions module.

Previous build time, with opt-level=1:

% time cargo build --release
   Compiling steven_blocks v0.0.1
    Finished release [optimized] target(s) in 21.24s
cargo build --release  31.80s user 0.71s system 152% cpu 21.276 total

With this change, opt-level=3 and the function splitting fix:

% time cargo build --release
   Compiling steven_blocks v0.0.1
    Finished release [optimized] target(s) in 30.80s
cargo build --release  40.26s user 0.86s system 133% cpu 30.850 total

Full optimizations are expectedly slightly slower, but this is still
much much _much_ faster than before this refactoring, where this crate
would take up to an unbelievable 5 hours (and tens of GB of RAM). Long
story short, we're now back to full optimizations and stable Rust.

Thanks to dtolnay on the Rust programming language forum for suggesting
this technique, https://users.rust-lang.org/t/5-hours-to-compile-macro-what-can-i-do/36508/2
2020-01-09 20:08:28 -08:00
ice_iix 90f7d9afd9 Update sha-1 and zip dependencies
Closes #263 Bump sha-1 from 0.8.1 to 0.8.2
Closes #265 Bump zip from 0.5.3 to 0.5.4
2020-01-07 19:31:10 -08:00
iceiix a020ed6f2c
Update to glutin 0.22.0-alpha5, remove wasm_stub (#260)
Update from glutin 0.21.x fork to glutin 0.22.0-alpha5 and corresponding
compatible version of winit. This removes our custom temporary wasm_stub
branches, back to mainline glutin and winit, and is a step towards WebAssembly
compatibility, most importantly merging the game loop and event loops as
required by winit _which now supports wasm_. Not yet functional on the web
because other web dependencies have to be added, see #171 and #34, but native
functionality is preserved.

* Update for 0.22 glutin API changes:

* Move game logic into event loop, run() replacing poll_events()

* Specify fullscreen Borderless mode

* Pass generic parameter of Event through handle_window_event
* hidpi_factor() replaces get_hidpi_factor()
* with_inner_size() replaces with_dimensions()
* No longer need to unwrap() LogicalSize
* set_cursor_grab/visible() replaces grab/hide_cursor()

* Fix modifiers deprecated warnings by destructuring only event fields we use, ignoring the rest with '..'

* Remove unnecessary mutability from events_loop

* Listen for ModifiersChanged event, fixing deprecated modifiers field

* Change to stdweb for web backend, replacing web-sys

* Pin to glutin =0.22.0-alpha5 and winit =0.20.0-alpha6
2020-01-05 17:56:32 -08:00
iceiix 8ab981f3ad
Update to reqwest 0.10.0. Closes #259
* Bump reqwest from 0.9.22 to 0.10.0

* Use blocking reqwest API instead of futures, for now
2020-01-05 10:38:21 -08:00
ice_iix b307843d2b Change to PCG random number generator algorithm
See http://www.pcg-random.org/ for benefits of PCG over xorshift
Updates #236 #183
2020-01-05 10:01:44 -08:00
ice_iix 6c32fce5a3 Update rand to 0.7.2 and rand_xorshift 0.2.0. Closes #236, closes #183 2020-01-05 09:49:03 -08:00
ice_iix cfbcf71b40 Bump image from 0.21.3 to 0.22.3. Closes #238 2020-01-05 09:10:59 -08:00
ice_iix 3f5f02db93 Update dependencies: base64, flate2, num-traits, and more (#257)
* Closes #237 Bump base64 from 0.10.1 to 0.11.0

* Closes #241 Bump flate2 from 1.0.12 to 1.0.13

* Closes #245 Bump num-traits from 0.2.8 to 0.2.10

* Closes #248 Bump serde_json from 1.0.41 to 1.0.44

* Closes #249 Bump serde from 1.0.102 to 1.0.104

* Closes #251 Bump web-sys from 0.3.30 to 0.3.33

* Closes #254 Bump structopt from 0.3.3 to 0.3.7

* Bump cfg-if from 0.1.9 to 0.1.10

* `cargo update` all modules
2020-01-05 08:00:55 -08:00
ice_iix e04ee876f3 Nightly rust, steven_blocks: reduce optimizations in release. Fixes #184 (#255)
Reduce to "basic optimizations" for the steven_blocks module, so it
doesn't take hours of time and gigabytes of memory to compile. The main
program and other code still builds with full optimizations in release
mode, to accomplish this, the profile-overrides feature is required so
we also switch to nightly Rust (to be switched to 1.41+ in #258).

* Update to rustc 1.42.0-nightly (760ce94c6 2020-01-04)

* Update builds.sr.ht to use +nightly

* Override opt-level=1 for steven_blocks using profile-overrides
2020-01-05 07:16:10 -08:00
ice_iix 3946f22863 Update serde, image, hex, lazy_static, structopt..
* serde 1.1.0.2, closes #233
* image 0.21.3, closes #221
* hex 0.4.0, closes #225
* lazy_static 1.4.0, closes #217
* structopt 0.3.3, closes #231
  * Requires rustc 1.36+, updated in previous commit
* reqwest 0.9.22, closes #230
* cargo update, closes #219
2019-11-02 14:24:50 -07:00
ice_iix 80006d9212 Update web-sys, zip, flate2 dependencies
Closes #209 Bump web-sys from 0.3.25 to 0.3.26
Closes #210 Bump zip from 0.5.2 to 0.5.3
Closes #211 Bump flate2 from 1.0.9 to 1.0.11
2019-08-17 13:34:32 -07:00
ice_iix 862c40c59d Update dependencies: web-sys, reqwest, log, serde
Closes #196 Bump web-sys from 0.3.24 to 0.3.25
Closes #200 Bump reqwest from 0.9.18 to 0.9.19
Closes #202 Bump log from 0.4.6 to 0.4.8
Closes #203 Bump serde from 1.0.94 to 1.0.98
2019-08-11 16:18:57 -07:00
ice_iix 8c0350eb7c Update web-sys, flate2, structopt, serde/json, and minor deps
Closes #187 Bump web-sys from 0.3.22 to 0.3.24
Closes #188 Bump flate2 from 1.0.7 to 1.0.9
Closes #189 Bump structopt from 0.2.16 to 0.2.18
Closes #190 Bump serde from 1.0.92 to 1.0.94
Closes #192 Bump serde_json from 1.0.39 to 1.0.40

`cargo update` updates smallvec (and others) used by collision:
Closes #193 [Security] Bump smallvec from 0.6.9 to 0.6.10
2019-07-02 19:08:50 -07:00
ice_iix 115560ce82 Update byteorder, serde, image, reqwest
Closes #181, closes #178, closes #179, closes #180
2019-06-10 17:09:19 -07:00
dependabot-preview[bot] f52913ee86 Bump structopt from 0.2.15 to 0.2.16 (#172)
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.2.15 to 0.2.16.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.2.15...v0.2.16)
2019-05-31 09:24:49 -07:00
iceiix 836ab9f126
wasm: Fix operation not supported on std::fs. Closes #115 (#166)
* Add new web-based std::fs replacement, localstoragefs:

https://github.com/iceiix/localstoragefs

* Add std_or_web to switch between std::fs (native) or localstoragefs (web)

* Update www readme for new missing glutin/winit links, opens issue #171
2019-05-29 08:21:56 -07:00
ice_iix 3eee3e9163 Fix dual-license MIT/Apache-2.0 syntax in Cargo.toml 2019-05-29 08:13:38 -07:00
dependabot-preview[bot] ef334643cc Bump num-traits from 0.2.7 to 0.2.8 (#165)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.7...num-traits-0.2.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-24 19:00:29 -07:00
dependabot[bot] 51aa361bbc Bump num-traits from 0.2.6 to 0.2.7 (#162)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.6...num-traits-0.2.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-22 17:29:39 -07:00
ice_iix c6b753bc9a Update to patched glutin wasm_stub allowing compiling for wasi
Includes 1e48d3216e

Progress towards #115, fixes the missing glutin symbols when compiling
with cargo +nightly build --target wasm32-wasi
2019-05-22 17:28:27 -07:00
iceiix fd7add3f17
wasm: log output to browser JavaScript console (#163)
Logging from the `log` facade goes to the colorized in-game GUI console (opened with the backtick key), as well as standard output using `println!` on the native build. To make this work on the wasm build, web-sys is used to access the `console` object, to call `console.log`, `console.warn`, and so on corresponding to the log levels. Extends #92, fails later (see also #115) but now outputs the starting up message:

[main.rs:206][INFO] Starting steven

* Add println! logging to console.log on wasm

* Initialize logger before config (called 'console variables' for some reason) to avoid having to disable it to reach the first logging statement

* Add web-sys crate for browser console access, wasm32-only

* Refactor logger to call println_level on both web/native

* Add multiple log levels, console.warn etc., matching console_log crate

https://github.com/iamcodemaker/console_log#details
2019-05-22 16:12:43 -07:00
iceiix 8071db668c
Update to glutin 0.21.0. Closes #157 (#160)
Updating the glutin dependency to a 0.21.0-based branch, based on the migration guide at:
https://gentz.rocks/posts/glutin-v0-21-0-migration-guide/

* Remove glutin::ContextTrait

* Create window with ContextBuilder instead of WindowedContext::new

* Add .window() accessor on WindowContext, since it now dereferences to Context

In order to not break wasm32-unknown-unknown compilation, a minor fork is used of glutin v0.21.0 and a corresponding version of winit: https://github.com/iceiix/glutin/pull/1 https://github.com/iceiix/winit/pull/2
 - with stubs to compile (but not run, see issue #115)
2019-05-19 17:58:08 -07:00
dependabot[bot] 381815ce22 Bump reqwest from 0.9.16 to 0.9.17 (#158)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.16 to 0.9.17.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.16...v0.9.17)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 11:35:47 -07:00
dependabot[bot] f8e59a74bb Bump wasm-bindgen from 0.2.43 to 0.2.44 (#159)
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.43 to 0.2.44.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 11:35:09 -07:00
dependabot[bot] b244406850 Bump cfg-if from 0.1.7 to 0.1.9 (#154)
Bumps [cfg-if](https://github.com/alexcrichton/cfg-if) from 0.1.7 to 0.1.9.
- [Release notes](https://github.com/alexcrichton/cfg-if/releases)
- [Commits](https://github.com/alexcrichton/cfg-if/compare/0.1.7...0.1.9)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-15 07:57:45 -07:00
iceiix c8e13c38bd Fix movement fixed-point packets, misplaced players on 1.7/8 (#140)
Movement packets were handled incorrectly, because although the fields are specified as integers they are actually fixed-point values, which need to be converted to floating-point before use. These fields were converted with `as f64`, but they actually need to be scaled. To fix this add several new types, FixedPoint5 for 5-bit fractional fixed-point and FixedPoint12 for 12-bit. Both are parameterized by an integer type: FixedPoint5<i32> and FixedPoint5<i8> for 1.7.10/1.8.9, FixedPoint12<i16> for 1.9+. This moves the calculation into the packet field parsing, so it no longer has to be calculated in src/server/mod.rs since the scaling is taken care of as part of the field type. This fixes the long-standing invisible or actually misplaced players bug on 1.7.10 and 1.8.9, closes #139.

* Add new FixedPoint5<T> type for 1.7/8, https://wiki.vg/Data_types#Fixed-point_numbers

* Add FixedPoint12<i16> for 1.9+, moving type conversion into packet type

https://wiki.vg/index.php?title=Protocol#Entity_Relative_Move

* Add num-traits 0.2.6 dependency for NumCast to use instead of From

* Use FixedPoint5<i32> in spawn object, experience orb, global entity, mob, player, teleport

* Use FixedPoint5<i8> and FixedPoint12<i16> in entity move, look and move

* Update packet handling bouncer functions, using f64::from for each conversion
2019-05-11 13:28:25 -07:00
iceiix 185f3d0297
Update cgmath and collision. Closes #97, closes #126 (#138)
* Update cgmath and collision. Closes #97, closes #126

* Update steven_blocks cgmath/collision

* Run cargo update
2019-05-10 15:39:56 -07:00
ice_iix 99a4e77a11 Update wasm-bindgen and cargo update. Closes #133 2019-05-08 20:01:06 -07:00
ice_iix b1cae32eed Update to rand 0.6.5 and migrate off deprecated methods. Closes #81
* Import from rand_xorshift crate

* Use shuffle/choose from SliceRandom trait

See https://rust-random.github.io/book/update-0.6.html
2019-05-08 19:32:05 -07:00
dependabot[bot] 68bf0970a3 Bump serde from 1.0.90 to 1.0.91 (#137)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.90 to 1.0.91.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.90...v1.0.91)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 18:51:41 -07:00
iceiix 047ba79947
Add command-line arguments parsing, --server (#90) (#114)
* Add structopt dependency

* Add command-line --server argument to connect to server on startup

* Don't show login/server screen (which pings servers) when connecting to a server from command-line
2019-05-04 18:36:22 -07:00
ice_iix 0d02759d46 Update image, reqwest dependencies. Closes GH-130, closes GH-131 2019-04-30 19:18:27 -07:00
ice_iix 1e848d957b Update cfg-if, cfb8, flate2, serde, zip
Closes #116 Bump cfg-if from 0.1.6 to 0.1.7
Closes #120 Bump cfb8 from 0.3.1 to 0.3.2
Closes #122 Bump flate2 from 1.0.6 to 1.0.7
Closes #124 Bump serde from 1.0.89 to 1.0.90
Closes #127 Bump zip from 0.5.0 to 0.5.2
2019-04-13 08:16:42 -07:00
ice_iix 0d5c1478a5 Update for glutin wasm_stub branch tracking Rust 2018 changes
c0b36056bd
https://github.com/iceiix/glutin/pull/1
2019-03-03 11:50:52 -08:00
iceiix 2f2f35848a
Add support for compiling WebAssembly wasm32-unknown-unknown target (#92)
Note this only is the first step in web support, although the project compiles, it doesn't run!

Merging now to avoid branch divergence, until dependencies can be updated for wasm support.

* Add instructions to build for wasm32-unknown-unknown with wasm-pack in www/

* Update to rust-clipboard fork to compile with emscripten

https://github.com/aweinstock314/rust-clipboard/pull/62

* Exclude reqwest dependency in wasm32

* Exclude compiling clipboard pasting on wasm32

* Exclude reqwest-using code from wasm32

* Install wasm target with rustup in Travis CI

* Update to collision 0.19.0

Fixes wasm incompatibility in deprecated rustc-serialize crate: https://github.com/rustgd/collision-rs/issues/106

error[E0046]: not all trait items implemented, missing: `encode`
    --> github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1358:1

* Increase travis_wait time even further, try 120 minutes

* Set RUST_BACKTRACE=1 in main

* Remove unused unneeded bzip2 features in zip crate

To fix wasm32-unknown-unknown target compile error:
error[E0432]: unresolved imports `libc::c_int`, `libc::c_uint`, `libc::c_void`, `libc::c_char`
 --> src/github.com-1ecc6299db9ec823/bzip2-sys-0.1.7/lib.rs:5:12
  |
5 | use libc::{c_int, c_uint, c_void, c_char};
  |            ^^^^^  ^^^^^^  ^^^^^^  ^^^^^^ no `c_char` in the root
  |            |      |       |
  |            |      |       no `c_void` in the root
  |            |      no `c_uint` in the root
  |            no `c_int` in the root

* flate2 use Rust backend

* Add console_error_panic_hook module for wasm backtraces

* Build using wasm-pack, wasm-bindgen, run with wasm-app

* Update to miniz_oxide 0.2.1, remove patch for https://github.com/Frommi/miniz_oxide/issues/42

* Update to official clipboard crate since https://github.com/aweinstock314/rust-clipboard/pull/62 was merged, but git revision pending release

* Update to branch of glutin attempting to build for wasm

https://github.com/iceiix/glutin/pull/1

* Update winit dependency of glutin to git master

https://github.com/iceiix/winit/pull/2

* Update to glutin branch with working (compiles, doesn't run) wasm_stub

* Add app name in title on web page

* Add wasm to Travis-CI test matrix

* Update glutin to fix Windows EGL compilation on AppVeyor

97797352b5
2019-03-03 08:32:36 -08:00
ice_iix 13fbbaa80a Add recommended Cargo.toml description/repository/license fields
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
2019-03-03 07:13:10 -08:00
ice_iix d4e3f9f3da Update serde and serde_json versions
Closes #112 Bump serde_json from 1.0.38 to 1.0.39
Closes #113 Bump serde from 1.0.88 to 1.0.89
2019-03-02 15:20:03 -08:00
ice_iix 86b1c940ee Update to glutin unreleased post-0.19.0 git revision, current master 2019-03-02 15:17:45 -08:00
dependabot[bot] 40b2424cf0 Bump lazy_static from 1.2.0 to 1.3.0 (#111)
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.2.0...1.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-28 18:27:00 -08:00
ice_iix ab88f3ca99 Update serde, serde_json, and reqwest; minor version bumps
Closes #105 Bump serde_json from 1.0.37 to 1.0.38
Closes #107 Bump serde from 1.0.85 to 1.0.88
Closes #108 Bump reqwest from 0.9.9 to 0.9.10
2019-02-23 15:48:39 -08:00
ice_iix a5ba71ee38 Minor updates to serde, serde_json, reqwest, base64 dependencies
Closes #100 Bump serde from 1.0.84 to 1.0.85
Closes #101 Bump serde_json from 1.0.36 to 1.0.37
Closes #102 Bump reqwest from 0.9.8 to 0.9.9
Closes #103 Bump base64 from 0.10.0 to 0.10.1
2019-01-26 07:38:36 -08:00
ice_iix 3b211064bd Update flate2 to use Rust backend, zip remove unneeded features
Found as part of #92 WebAssembly support, but this optimization applies
to native platforms, as well. https://github.com/iceiix/stevenarella/pull/92#issuecomment-455923439
2019-01-26 07:31:21 -08:00
dependabot[bot] 18217c2849 Bump collision from 0.18.0 to 0.19.0 (#95)
Required for #92 WebAssembly support, since it fixes the deprecated rustc-serialize dependency:

https://github.com/iceiix/stevenarella/pull/92#issuecomment-453775934

* Bump collision from 0.18.0 to 0.19.0

Bumps [collision](https://github.com/rustgd/collision-rs) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/rustgd/collision-rs/releases)
- [Changelog](https://github.com/rustgd/collision-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustgd/collision-rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* blocks/Cargo.toml: Bump collision to 0.19.0
2019-01-19 07:47:46 -08:00
dependabot[bot] 5040ebd2c7 Bump serde_json from 1.0.34 to 1.0.36 (#96)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.34 to 1.0.36.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.34...v1.0.36)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-18 17:00:03 -08:00
ice_iix 1e5f9c2b4a Update reqwest and image dependencies. Closes #85, closes #86 2019-01-12 11:04:40 -08:00
ice_iix c80372a1f1 Rename project to Stevenarella (#83)
This fork has significantly diverged from the original, it is time
to make it official, as a new distinct project. Forked from
https://github.com/thinkofname/steven into https://github.com/iceiix/steven,
now moved to https://github.com/iceiix/stevenarella and renamed accordingly.

* Update readme

* Update logo

* Update binary name

* Update window title

* Update splash text
2019-01-11 20:41:19 -08:00
iceiix e1769edae8
Update base64, serde_json, and serde (#76)
* Update to base64 0.10.0, use standard base64 config. Closes https://github.com/iceiix/steven/pull/52

* Update to serde_json 1.0.34. Closes https://github.com/iceiix/steven/pull/73

* Update to serde 1.0.84. Closes https://github.com/iceiix/steven/pull/74
2019-01-05 19:55:27 -08:00
dependabot[bot] e360fbd3d4 Bump serde from 1.0.82 to 1.0.83 (#70)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.82 to 1.0.83.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.82...v1.0.83)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-28 17:17:23 -08:00
dependabot[bot] 44dc7eedd5 Bump serde from 1.0.80 to 1.0.82 (#66)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.80 to 1.0.82.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.80...v1.0.82)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-14 18:17:35 -08:00
dependabot[bot] de4fd7d28d Bump serde from 1.0.79 to 1.0.80 (#59)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.79 to 1.0.80.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.79...v1.0.80)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-04 15:22:19 -08:00
dependabot[bot] 16d0d2dded Bump zip from 0.4.2 to 0.5.0 (#58)
Bumps [zip](https://github.com/mvdnes/zip-rs) from 0.4.2 to 0.5.0.
- [Release notes](https://github.com/mvdnes/zip-rs/releases)
- [Commits](https://github.com/mvdnes/zip-rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-04 15:22:00 -08:00
ice_iix 26bc33a178 Update flate2, sha-1, lazy_static, and reqwest dependencies
Closes https://github.com/iceiix/steven/pull/49 Bump flate2 from 1.0.2 to 1.0.6
Closes https://github.com/iceiix/steven/pull/50 Bump sha-1 from 0.8.0 to 0.8.1
Closes https://github.com/iceiix/steven/pull/51 Bump lazy_static from 1.1.0 to 1.2.0
Closes https://github.com/iceiix/steven/pull/53 Bump reqwest from 0.9.4 to 0.9.5
2018-12-03 14:29:29 -08:00
dependabot[bot] 8dade5b230 Bump byteorder from 1.2.6 to 1.2.7 (#45)
Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/BurntSushi/byteorder/releases)
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.2.6...1.2.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-02 07:16:31 -08:00
dependabot[bot] 0b356337b1 Bump image from 0.20.0 to 0.20.1 (#43)
Bumps [image](https://github.com/PistonDevelopers/image) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/PistonDevelopers/image/releases)
- [Changelog](https://github.com/PistonDevelopers/image/blob/master/CHANGES.md)
- [Commits](https://github.com/PistonDevelopers/image/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-02 07:16:18 -08:00
dependabot[bot] ff8a452af9 Bump log from 0.4.5 to 0.4.6 (#42)
Bumps [log](https://github.com/rust-lang/log) from 0.4.5 to 0.4.6.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang-nursery/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.5...0.4.6)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-02 07:16:06 -08:00
dependabot[bot] a5d913d61a Bump serde_json from 1.0.32 to 1.0.33 (#41)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.32 to 1.0.33.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.32...v1.0.33)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-02 07:15:54 -08:00
iceiix c099a68168
Use glutin to replace sdl2 (#35)
* Add glutin dependency

* Create a glutin window

* Use the glutin window, basics work

* Store DPI factor on game object, update on Resized

* Use physical size for rendering only. Fixes UI scaled too small

Fixes https://github.com/iceiix/steven/pull/35#issuecomment-442683373
See also https://github.com/iceiix/steven/issues/22

* Begin adding mouse input events

* Listen for DeviceEvents

* Call hover_at on mouse motion

* Listen for CursorMoved window event, hovering works

Glutin has separate WindowEvent::CursorMoved and
DeviceEvent::MouseMotion events, for absolute cursor and relative mouse
motion, respectively, instead of SDL's Event::MouseMotion for both.

* Use tuple pattern matching instead of nested if for MouseInput

* Implement left clicking

* Use grab_cursor() to capture the cursor

* Hide the cursor when grabbing

* Implement MouseWheel event

* Listen for keyboard input, escape key release

* Keyboard input: console toggling, glutin calls backquote 'grave'

* Implement fullscreen in glutin, updates https://github.com/iceiix/steven/pull/31

* Update settings for glutin VirtualKeyCode

* Keyboard controls (note: must clear conf.cfg to use correct bindings)

* Move DeviceEvent match arm up higher for clarity

* Remove SDL

* Pass physical dimensions to renderer tick so blit_framebuffer can use full size but the ui is still sized logically.

* Listen for DeviceEvent::Text

* Implement text input using ReceivedCharacter window event, works

https://github.com/iceiix/steven/pull/35#issuecomment-443247267

* Request specific version of OpenGL, version 3.2

* Request OpenGL 3.2 but fallback to OpenGL ES 2.0 if available (not tested)

* Set core profile and depth 24-bits, stencil 0-bits

* Allow changing vsync, but require restarting (until https://github.com/tomaka/glutin/issues/693)

* Clarify specific Rust version requirement

* Import glutin::* in handle_window_event() to avoid overly repetitive code

* Linux in VM fix: manually calculate delta in MouseMotion

For the third issue on https://github.com/iceiix/steven/pull/35#issuecomment-443084458
https://github.com/tomaka/glutin/issues/1084 MouseMotion event returns absolute instead of relative values, when running Linux in a VM

* Heuristic to detect absolute/relative MouseMotion from delta:(xrel, yrel); use a higher scaling factor

* Add clipboard pasting with clipboard crate instead of sdl2

https://github.com/iceiix/steven/pull/35#issuecomment-443307295
2018-11-30 11:35:35 -08:00
ice_iix 52ed85a440 Update to rsa_public_encrypt_pkcs1 0.2.0 2018-11-05 17:17:02 -08:00
ice_iix 0d8696286c Update Cargo.tomls to Rust edition 2018, fix crate imports. Closes #13 2018-11-04 12:15:34 -08:00
iceiix 1589a29685
Remove use of OpenSSL for RSA PKCS1 encryption (#12). Closes #2
* Add handwritten RSA PKCS1 encryption using num-bigint and simple_asn1

* Add more logging to compare OpenSSL with/without side-by-side

* Log message and ciphertext in hex

* Print N and e as hexadecimal integers

* Fix bad encryption caused by zeros in PKCS1 padding

PS field in https://tools.ietf.org/html/rfc8017#section-7.2.1
Must be nonzero

* Use rand fill instead of rand_bytes

* Remove OpenSSL!

* Update CI scripts and docs to not install OpenSSL

* Remove copying OpenSSL DLLs (libeay and ssleay) in AppVeyor script

* Change rsa_public_encrypt_pkcs1 to return a Result<Vec<u8>, String>

* Add error checking, returning Err<String> on failure; RFC comments

* Add the required message representative range checking

* Use expect() instead of unwrap() on from_der

* Map the ASN.1 error to a String to return it from rsa_public_encrypt_pkcs1() instead of panicking

* Move RSA to a new crate, rsa_public_encrypt_pkcs1

https://github.com/iceiix/rsa_public_encrypt_pkcs1

* Update to rsa_public_encrypt_pkcs1 with simple_asn 0.1.0

https://github.com/iceiix/rsa_public_encrypt_pkcs1/issues/1

* Update to published version of rsa_public_encrypt_pkcs1, 0.1.0

* Remove unnecessarily added blank line

* Remove libssl-dev from .travis.yml
2018-11-04 09:40:51 -08:00
iceiix 6d88ce23ec Switch to RustCrypto for Cfb8 symmetric crypto, instead of OpenSSL (#10) (#2)
* Encrypt with both RustCrypto cfb8 and OpenSSL

* Switch to RustCrypto for decrypting

* Show encryption for both RustCrypto and OpenSSL, for comparison...

* Correct off-by-one error in encryption, cfb8 doesn't need extra byte

* Remove OpenSSL for symmetric crypto

* Update Cargo.lock
2018-11-01 20:46:21 -07:00
ice_iix 56a1cb2b76 Fix logging with set_boxed_logger, add std feature to dep
https://github.com/rust-lang-nursery/log/issues/303
2018-10-28 19:45:57 -07:00
ice_iix 51a5e3ed5c Update to rust-openssl 0.10.15 (from 0.7.8)
Major API change, the last of the outdated dependencies
Closes https://github.com/iceiix/steven/issues/4

Note: would still like to replace the last usages of the OpenSSL crate
https://github.com/iceiix/steven/issues/2 but it is needed for CFB8
until a replacement is available (maybe https://github.com/RustCrypto/stream-ciphers/issues/4)
2018-10-27 19:56:34 -07:00
ice_iix 80c740c1c5 Update to cgmath 0.16.1, collision 0.18.0
https://github.com/iceiix/steven/issues/4
2018-10-27 18:11:26 -07:00
iceiix b17f296ab4
Replace hyper with reqwest (#7)
An old version of hyper was used before (0.8.0), in the process of updating to hyper 0.12.11, found this higher-level replacement/wrapper, reqwest 0.9.4 which is simpler to use than the latest hyper and serves the purpose of a simple HTTP client well

* Begin updating to hyper 0.12.11

https://github.com/iceiix/steven/issues/4#issuecomment-425759778

* Use type variables for hyper::Client

* Fix setting header syntax, Content-Type: application/json, 17->13

* Parse strings into URLs with url.parse::<hyper::Uri>().unwrap()

b20971cb4e/examples/client.rs (L25)

* Use hyper::Request::post() then client.request() since client.post() removed

* wait() on the ResponseFuture to get the Result

* try! to unwrap the Result

* status() is now a method

* Concatenate body chunks unwrap into bytes, then parse JSON from byte slice, instead of from_reader which didn't compile

* Replace send() with wait() on ResponseFuture

* Parse HeaderValue to u64

* Slices implement std::io::Read trait

* Read into_bytes() instead of read_to_end()

* Disable boxed logger for now to workaround 'expected function, found macro'

* Remove unnecessary mutability, warnings

* Hack to parse twice to avoid double move

* Use hyper-rustls pure Rust implementation for TLS for HTTPS in hyper

* Start converting to reqwest: add Protocol::Error and reqwest::Error conversion

* Use reqwest, replacing hyper, in protocol

* Convert resources to use reqwest instead of hyper

* Convert skin download to reqwest, instead of hyper

* Remove hyper

* Revert unnecessary variable name change req/body to reduce diff

* Revert unnecessary whitespace change to reduce diff, align indentation on .

* Fix authenticating to server, wrong method and join URL

* Update Cargo.lock
2018-10-27 17:03:34 -07:00
iceiix de6cd2044e
Update to serde_json 1.0 (#6)
* Replace find() with get()

* Update for renamed as_string->as_str and as_boolean->as_bool

https://github.com/serde-rs/json/releases/tag/v0.8.0
Value::as_string() has been renamed to as_str() and Value::as_boolean() has been renamed to as_bool() to improve consistency
https://github.com/serde-rs/json/issues/126

* No serde_json::Value::I64/U64/F64 anymore, only Number

* Update from lookup() to pointer(), using JSON pointer syntax

https://github.com/iceiix/steven/pull/6#issuecomment-432472123

* Remove unused and removed ObjectBuilder import

* Use into_iter().collect() to convert BTreeMap to serde_json::Map

* Change parse_rules to accept serde_json::Map instead of BTreeMap

* Remove unused serde_json macro_use

* Update Cargo.lock
2018-10-23 18:47:21 -07:00
ice_iix 7503b90667 Use the RustCrypto sha-1 crate instead of sha1
For https://github.com/iceiix/steven/issues/2#issuecomment-425769562
2018-10-03 18:28:05 -07:00
ice_iix 9997174fae Update to serde 1.0.79 for https://github.com/iceiix/steven/issues/4 2018-09-30 19:42:13 -07:00
ice_iix d2b59fbd10 Update to rand 0.5.5 for https://github.com/iceiix/steven/issues/4
Useful guide: https://github.com/rust-random/rand/blob/master/UPDATING.md
2018-09-30 19:05:20 -07:00
ice_iix c688836a16 Use hex module for hex decoding, removing deprecated rustc-serialize for https://github.com/iceiix/steven/issues/4 2018-09-30 18:14:36 -07:00
ice_iix e988c64376 Use base64 crate for base64 instead of deprecated rustc-serialize, for https://github.com/iceiix/steven/issues/4 2018-09-30 17:58:40 -07:00
ice_iix fe99910550 Update to image 0.20.0 2018-09-30 17:21:05 -07:00
ice_iix 9f49d10eb3 Update to lazy_static 1.1.0
https://github.com/iceiix/steven/issues/4
2018-09-30 17:11:22 -07:00
ice_iix 43f6565fa5 Update to log 0.4.5
https://github.com/iceiix/steven/issues/4
2018-09-30 16:36:00 -07:00
ice_iix a25eaf1476 Update to zip 0.4.2
https://github.com/iceiix/steven/issues/4
2018-09-30 16:20:33 -07:00