simple cleanup
This commit is contained in:
parent
ff505e1468
commit
0b760fb21f
5 changed files with 40 additions and 11 deletions
|
@ -5,3 +5,6 @@ members = [
|
|||
"automerge-backend",
|
||||
"automerge-backend-wasm",
|
||||
]
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
|
|
@ -11,10 +11,6 @@ edition = "2018"
|
|||
[lib]
|
||||
crate-type = ["cdylib","rlib"]
|
||||
|
||||
[profile.release]
|
||||
# This makes the compiled code faster and smaller, but it makes compiling slower,
|
||||
# so it's only enabled in release mode.
|
||||
lto = true
|
||||
|
||||
[features]
|
||||
# If you uncomment this line, it will enable `wee_alloc`:
|
||||
|
@ -27,15 +23,15 @@ automerge-backend = { path = "../automerge-backend" }
|
|||
serde-wasm-bindgen = "^0.1.3"
|
||||
js-sys = "0.3"
|
||||
|
||||
[dependencies.wasm-bindgen]
|
||||
version = "^0.2"
|
||||
features = ["serde-serialize"]
|
||||
|
||||
# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
|
||||
# compared to the default allocator's ~10K. However, it is slower than the default
|
||||
# allocator, so it's not enabled by default.
|
||||
wee_alloc = { version = "0.4.2", optional = true }
|
||||
|
||||
[dependencies.wasm-bindgen]
|
||||
version = "^0.2"
|
||||
features = ["serde-serialize"]
|
||||
|
||||
# The `web-sys` crate allows you to interact with the various browser APIs,
|
||||
# like the DOM.
|
||||
[dependencies.web-sys]
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
{
|
||||
"author": "Orion Henry <orion@inkandswitch.com>",
|
||||
"name": "automerge-backend-wasm",
|
||||
"description": "wasm-bindgen bindings to the automerge-backend rust implementation",
|
||||
"version": "0.1.0",
|
||||
"license": "MIT",
|
||||
"main": "./pkg/index.js",
|
||||
"scripts": {
|
||||
"build": "rimraf pkg && wasm-pack build --target nodejs --out-name index",
|
||||
"test": "cargo test && wasm-pack test --node"
|
||||
},
|
||||
"devDependencies": {
|
||||
"automerge":"^0.12.1",
|
||||
"rimraf": "^2.6.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ use js_sys::Array;
|
|||
use serde_wasm_bindgen::{from_value,to_value};
|
||||
use automerge_backend::{Backend, ActorID, Change, Clock};
|
||||
|
||||
// When the `wee_alloc` feature is enabled, this uses `wee_alloc` as the global
|
||||
// allocator.
|
||||
#[cfg(feature = "wee_alloc")]
|
||||
#[global_allocator]
|
||||
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
|
||||
|
@ -17,7 +15,6 @@ extern "C" {
|
|||
fn log(s: &str);
|
||||
}
|
||||
|
||||
// We need a wrapper object to attach the wasm-bindgen on
|
||||
#[wasm_bindgen]
|
||||
#[derive(PartialEq,Debug, Clone)]
|
||||
pub struct State { backend: Backend }
|
||||
|
|
|
@ -2,6 +2,16 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
automerge@^0.12.1:
|
||||
version "0.12.1"
|
||||
resolved "https://registry.yarnpkg.com/automerge/-/automerge-0.12.1.tgz#8e8ca23affa888c6376ee19068eab573cfa8ba09"
|
||||
integrity sha512-7JOiRk4b6EP/Uj0AjmZTeYICXJmBRHFkL0U3mlTNXuDlUr3c4v/Wb8v0RXiX4UuVgGjkovcjOdiBMkVmzdu2KQ==
|
||||
dependencies:
|
||||
immutable "^3.8.2"
|
||||
transit-immutable-js "^0.7.0"
|
||||
transit-js "^0.8.861"
|
||||
uuid "3.3.2"
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||
|
@ -37,6 +47,11 @@ glob@^7.1.3:
|
|||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
immutable@^3.8.2:
|
||||
version "3.8.2"
|
||||
resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3"
|
||||
integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
|
@ -76,6 +91,21 @@ rimraf@^2.6.3:
|
|||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
transit-immutable-js@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/transit-immutable-js/-/transit-immutable-js-0.7.0.tgz#993e25089b6311ff402140f556276d6d253005d9"
|
||||
integrity sha1-mT4lCJtjEf9AIUD1VidtbSUwBdk=
|
||||
|
||||
transit-js@^0.8.861:
|
||||
version "0.8.861"
|
||||
resolved "https://registry.yarnpkg.com/transit-js/-/transit-js-0.8.861.tgz#829e516b80349a41fff5d59f5e6993b5473f72c9"
|
||||
integrity sha512-4O9OrYPZw6C0M5gMTvaeOp+xYz6EF79JsyxIvqXHlt+pisSrioJWFOE80N8aCPoJLcNaXF442RZrVtdmd4wkDQ==
|
||||
|
||||
uuid@3.3.2:
|
||||
version "3.3.2"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
|
||||
integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
|
|
Loading…
Add table
Reference in a new issue