update sqlite, update all wasms, small fixes (#60)

Co-authored-by: vms <michail.vms@gmail.com>
This commit is contained in:
Dima 2021-02-04 15:32:45 +03:00 committed by GitHub
parent 181d957560
commit 65a7223803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 110 additions and 99 deletions

View File

@ -10,28 +10,31 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- fce03-{{ checksum "Cargo.lock" }} - fce04-{{ checksum "Cargo.lock" }}
- run: | - run: |
rustup toolchain install nightly rustup toolchain install nightly-2020-12-15
rustup component add rustfmt rustup default nightly-2020-12-15
rustup component add clippy --toolchain nightly rustup override set nightly-2020-12-15
rustup component add rustfmt --toolchain nightly-2020-12-15
rustup component add clippy --toolchain nightly-2020-12-15
rustup target add wasm32-wasi rustup target add wasm32-wasi
cargo install fcli cargo install fcli
cargo fmt --all -- --check --color always cargo fmt --all -- --check --color always
cargo +nightly check -v --all-features cargo check -v --all-features
(cd ./examples; ./build.sh) (cd ./examples; ./build.sh)
cargo +nightly test --release -v --all-features cargo test --release -v --all-features
cargo +nightly clippy -v cargo clippy -v
- save_cache: - save_cache:
paths: paths:
- ~/.cargo - ~/.cargo
- ~/.rustup - ~/.rustup
key: fce03-{{ checksum "Cargo.lock" }} key: fce04-{{ checksum "Cargo.lock" }}
workflows: workflows:
version: 2.1 version: 2.1

166
Cargo.lock generated
View File

@ -99,9 +99,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]] [[package]]
name = "backtrace" name = "backtrace"
version = "0.3.55" version = "0.3.56"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc"
dependencies = [ dependencies = [
"addr2line", "addr2line",
"cfg-if 1.0.0", "cfg-if 1.0.0",
@ -167,9 +167,9 @@ checksum = "cfa8873f51c92e232f9bac4065cddef41b714152812bfc5f7672ba16d6ef8cd9"
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.4.0" version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" checksum = "f07aa6688c702439a1be0307b6a94dffe1168569e45b9500c1372bc580740d59"
[[package]] [[package]]
name = "byteorder" name = "byteorder"
@ -731,15 +731,6 @@ dependencies = [
"serde_json", "serde_json",
] ]
[[package]]
name = "fluence"
version = "0.2.18"
source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f"
dependencies = [
"fluence-sdk-macro 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)",
"fluence-sdk-main 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)",
]
[[package]] [[package]]
name = "fluence" name = "fluence"
version = "0.2.18" version = "0.2.18"
@ -750,6 +741,15 @@ dependencies = [
"fluence-sdk-main 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "fluence-sdk-main 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "fluence"
version = "0.2.18"
source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f"
dependencies = [
"fluence-sdk-macro 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)",
"fluence-sdk-main 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)",
]
[[package]] [[package]]
name = "fluence-app-service" name = "fluence-app-service"
version = "0.1.30" version = "0.1.30"
@ -800,14 +800,6 @@ dependencies = [
"wast", "wast",
] ]
[[package]]
name = "fluence-sdk-macro"
version = "0.2.18"
source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f"
dependencies = [
"fluence-sdk-wit 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)",
]
[[package]] [[package]]
name = "fluence-sdk-macro" name = "fluence-sdk-macro"
version = "0.2.18" version = "0.2.18"
@ -818,13 +810,11 @@ dependencies = [
] ]
[[package]] [[package]]
name = "fluence-sdk-main" name = "fluence-sdk-macro"
version = "0.2.18" version = "0.2.18"
source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f" source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f"
dependencies = [ dependencies = [
"fluence-sdk-macro 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)", "fluence-sdk-wit 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)",
"log",
"serde",
] ]
[[package]] [[package]]
@ -839,9 +829,20 @@ dependencies = [
] ]
[[package]] [[package]]
name = "fluence-sdk-wit" name = "fluence-sdk-main"
version = "0.2.18" version = "0.2.18"
source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f" source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f"
dependencies = [
"fluence-sdk-macro 0.2.18 (git+https://github.com/fluencelabs/rust-sdk)",
"log",
"serde",
]
[[package]]
name = "fluence-sdk-wit"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b75dbdd0275160f3818db3218563d791e6c612b616cd3c5d6e66283f207f648d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -854,8 +855,7 @@ dependencies = [
[[package]] [[package]]
name = "fluence-sdk-wit" name = "fluence-sdk-wit"
version = "0.2.18" version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/fluencelabs/rust-sdk#8d427c0e72e978922abbd1da0157b58c6a16a42f"
checksum = "b75dbdd0275160f3818db3218563d791e6c612b616cd3c5d6e66283f207f648d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -933,36 +933,36 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.9" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f01c61843314e95f96cc9245702248733a3a3d744e43e2e755e3c7af8348a0a9" checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846"
dependencies = [ dependencies = [
"futures-core", "futures-core",
] ]
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.9" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db8d3b0917ff63a2a96173133c02818fac4a746b0a57569d3baca9ec0e945e08" checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65"
[[package]] [[package]]
name = "futures-sink" name = "futures-sink"
version = "0.3.9" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6adabac1290109cfa089f79192fb6244ad2c3f1cc2281f3e1dd987592b71feb" checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6"
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.9" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a92a0843a2ff66823a8f7c77bffe9a09be2b64e533562c412d63075643ec0038" checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86"
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.9" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "036a2107cdeb57f6d7322f1b6c363dad67cd63ca3b7d1b925bdf75bd5d96cda9" checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-task", "futures-task",
@ -1027,9 +1027,9 @@ dependencies = [
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.1" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4060f4657be78b8e766215b02b18a2e862d83745545de804638e2b545e81aee6" checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"libc", "libc",
@ -1100,9 +1100,9 @@ dependencies = [
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.1.17" version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
dependencies = [ dependencies = [
"libc", "libc",
] ]
@ -1319,9 +1319,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.46" version = "0.3.47"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65"
dependencies = [ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
@ -1363,9 +1363,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.82" version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" checksum = "7eb0c4e9c72ee9d69b767adebc5f4788462a3b45624acd919475c92597bcaf4f"
[[package]] [[package]]
name = "local_storage" name = "local_storage"
@ -1395,11 +1395,11 @@ dependencies = [
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.13" version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
dependencies = [ dependencies = [
"cfg-if 0.1.10", "cfg-if 1.0.0",
] ]
[[package]] [[package]]
@ -1620,9 +1620,9 @@ dependencies = [
[[package]] [[package]]
name = "object" name = "object"
version = "0.22.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4"
[[package]] [[package]]
name = "once_cell" name = "once_cell"
@ -1862,9 +1862,9 @@ dependencies = [
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.8.1" version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c24fcd450d3fa2b592732565aa4f17a27a61c65ece4726353e000939b0edee34" checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
dependencies = [ dependencies = [
"libc", "libc",
"rand_chacha", "rand_chacha",
@ -1888,7 +1888,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5"
dependencies = [ dependencies = [
"getrandom 0.2.1", "getrandom 0.2.2",
] ]
[[package]] [[package]]
@ -1984,7 +1984,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [ dependencies = [
"getrandom 0.2.1", "getrandom 0.2.2",
"redox_syscall 0.2.4", "redox_syscall 0.2.4",
] ]
@ -2332,9 +2332,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2"
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.58" version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2431,11 +2431,11 @@ dependencies = [
[[package]] [[package]]
name = "thread_local" name = "thread_local"
version = "1.1.0" version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb9bc092d0d51e76b2b19d9d85534ffc9ec2db959a2523cdae0697e2972cd447" checksum = "d8208a331e1cb318dd5bd76951d2b8fc48ca38a69f5f4e4af1b6a9f8c6236915"
dependencies = [ dependencies = [
"lazy_static", "once_cell",
] ]
[[package]] [[package]]
@ -2459,9 +2459,9 @@ dependencies = [
[[package]] [[package]]
name = "tinyvec" name = "tinyvec"
version = "1.1.0" version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023"
dependencies = [ dependencies = [
"tinyvec_macros", "tinyvec_macros",
] ]
@ -2536,9 +2536,9 @@ dependencies = [
[[package]] [[package]]
name = "tower-service" name = "tower-service"
version = "0.3.0" version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
[[package]] [[package]]
name = "tracing" name = "tracing"
@ -2599,9 +2599,9 @@ checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
[[package]] [[package]]
name = "typetag" name = "typetag"
version = "0.1.6" version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83b97b107d25d29de6879ac4f676ac5bfea92bdd01f206e995794493f1fc2e32" checksum = "422619e1a7299befb977a1f6d8932c499f6151dbcafae715193570860cae8f07"
dependencies = [ dependencies = [
"erased-serde", "erased-serde",
"inventory", "inventory",
@ -2612,9 +2612,9 @@ dependencies = [
[[package]] [[package]]
name = "typetag-impl" name = "typetag-impl"
version = "0.1.6" version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f2466fc87b07b800a5060f89ba579d6882f7a03ac21363e4737764aaf9f99f9" checksum = "504f9626fe6cc1c376227864781996668e15c1ff251d222f63ef17f310bf1fec"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2696,7 +2696,7 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [ dependencies = [
"getrandom 0.2.1", "getrandom 0.2.2",
] ]
[[package]] [[package]]
@ -2782,9 +2782,9 @@ checksum = "93c6c3420963c5c64bca373b25e77acb562081b9bb4dd5bb864187742186cea9"
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.69" version = "0.2.70"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"serde", "serde",
@ -2794,9 +2794,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-backend" name = "wasm-bindgen-backend"
version = "0.2.69" version = "0.2.70"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
@ -2809,9 +2809,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-futures" name = "wasm-bindgen-futures"
version = "0.4.19" version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"js-sys", "js-sys",
@ -2821,9 +2821,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.69" version = "0.2.70"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c"
dependencies = [ dependencies = [
"quote", "quote",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
@ -2831,9 +2831,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.69" version = "0.2.70"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2844,9 +2844,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.69" version = "0.2.70"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64"
[[package]] [[package]]
name = "wasm-greeting" name = "wasm-greeting"
@ -3058,9 +3058,9 @@ dependencies = [
[[package]] [[package]]
name = "web-sys" name = "web-sys"
version = "0.3.46" version = "0.3.47"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "222b1ef9334f92a21d3fb53dc3fd80f30836959a90f9274a626d7e06315ba3c3" checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"wasm-bindgen", "wasm-bindgen",

View File

@ -9,3 +9,5 @@ modules_dir = "artifacts/"
name = "sqlite_test" name = "sqlite_test"
mem_pages_count = 1 mem_pages_count = 1
logger_enabled = false logger_enabled = false
preopened_files = ["/var"]
mapped_dirs = { "var" = "./var" }

View File

@ -6,5 +6,5 @@ fce build --release
rm artifacts/* rm artifacts/*
cp ../../target/wasm32-wasi/release/sqlite_test.wasm artifacts/ cp ../../target/wasm32-wasi/release/sqlite_test.wasm artifacts/
wget https://github.com/fluencelabs/sqlite/releases/download/v0.8.0_w/sqlite3.wasm wget https://github.com/fluencelabs/sqlite/releases/download/v0.9.0_w/sqlite3.wasm
mv sqlite3.wasm artifacts/ mv sqlite3.wasm artifacts/

View File

@ -70,15 +70,21 @@ pub fn test2(age: i64) {
cursor.bind(&[Value::Integer(age)]).unwrap(); cursor.bind(&[Value::Integer(age)]).unwrap();
while let Some(row) = cursor.next().unwrap() { while let Some(row) = cursor.next().unwrap() {
println!("name = {}", row[0].as_string().unwrap()); println!(
println!("age = {}", row[1].as_integer().unwrap()); "name = {}",
row[0].as_string().expect("error on row[0] parsing")
);
println!(
"age = {}",
row[1].as_integer().expect("error on row[1] parsing")
);
} }
} }
#[fce] #[fce]
pub fn test3() { pub fn test3() {
let db_path = "/var/folders/ww/v__xg0cj17x7h7sf3bgwpx8h0000gn/T/4589ab6f-5440-4933-ace5-a62714784142/tmp/users.sqlite"; let db_path = "/var/users.sqlite";
let connection = fce_sqlite_connector::open(db_path).unwrap(); let connection = fce_sqlite_connector::open(db_path).expect("error on connection establishing");
let execute_result = connection.execute( let execute_result = connection.execute(
" "
@ -90,7 +96,7 @@ pub fn test3() {
println!("execute result: {:?}", execute_result); println!("execute result: {:?}", execute_result);
let file_size = std::fs::metadata(db_path).unwrap().len(); //TODO fix it
// let file_size = std::fs::metadata(db_path).expect("error on file_size check").len();
println!("{} file size is {}", db_path, file_size); // println!("{} file size is {}", db_path, file_size);
} }