├── .github ├── FUNDING.yml └── workflows │ ├── depsbot.yml │ └── checks.yml ├── .gitignore ├── .rustfmt.toml ├── test_deps.ts ├── mod.ts ├── test.ts ├── src └── lib.rs ├── scripts ├── _deps.ts ├── clean.ts ├── fmt.ts ├── lint.ts ├── _util.ts └── build.ts ├── Cargo.toml ├── LICENSE ├── wasm.js ├── README.md └── Cargo.lock /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | open_collective: denosaurs 2 | github: denosaurs 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # cargo build 2 | target/ 3 | # wasm-pack 4 | pkg/ 5 | -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 80 2 | tab_spaces = 2 3 | edition = "2018" 4 | -------------------------------------------------------------------------------- /test_deps.ts: -------------------------------------------------------------------------------- 1 | export { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts"; 2 | -------------------------------------------------------------------------------- /mod.ts: -------------------------------------------------------------------------------- 1 | import init, { add as wasmAdd, source } from "./wasm.js"; 2 | 3 | await init(source); 4 | 5 | export function add(a: number, b: number): number { 6 | return wasmAdd(a, b); 7 | } 8 | -------------------------------------------------------------------------------- /test.ts: -------------------------------------------------------------------------------- 1 | import { assertEquals } from "./test_deps.ts"; 2 | import { add } from "./mod.ts"; 3 | 4 | Deno.test({ 5 | name: "add", 6 | fn: () => { 7 | assertEquals(add(1, 1), 2); 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use wasm_bindgen::prelude::wasm_bindgen; 2 | 3 | #[cfg(feature = "wee_alloc")] 4 | #[global_allocator] 5 | static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; 6 | 7 | #[wasm_bindgen] 8 | pub fn add(a: i32, b: i32) -> i32 { 9 | a + b 10 | } 11 | -------------------------------------------------------------------------------- /scripts/_deps.ts: -------------------------------------------------------------------------------- 1 | export { encode } from "https://deno.land/std@0.76.0/encoding/base64.ts"; 2 | export { exists } from "https://deno.land/std@0.76.0/fs/mod.ts"; 3 | export { compress } from "https://deno.land/x/lz4@v0.1.2/mod.ts"; 4 | export { minify } from "https://jspm.dev/terser@5.2.1"; 5 | -------------------------------------------------------------------------------- /scripts/clean.ts: -------------------------------------------------------------------------------- 1 | import { exists } from "./_deps.ts"; 2 | import { requires, run } from "./_util.ts"; 3 | 4 | export async function clean() { 5 | await requires("cargo"); 6 | await run("cleaning cargo build", ["cargo", "clean"]); 7 | if (exists("pkg")) { 8 | console.log("removing pkg"); 9 | await Deno.remove("pkg", { recursive: true }); 10 | } 11 | } 12 | 13 | if (import.meta.main) { 14 | await clean(); 15 | } 16 | -------------------------------------------------------------------------------- /.github/workflows/depsbot.yml: -------------------------------------------------------------------------------- 1 | name: depsbot 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | schedule: 9 | - cron: "0 0 */2 * *" 10 | 11 | jobs: 12 | run: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout Repository 16 | uses: actions/checkout@v2 17 | 18 | - name: Run depsbot 19 | uses: denosaurs/depsbot@master 20 | with: 21 | github_token: ${{ secrets.GITHUB_TOKEN }} 22 | -------------------------------------------------------------------------------- /scripts/fmt.ts: -------------------------------------------------------------------------------- 1 | import { requires, run } from "./_util.ts"; 2 | 3 | export async function fmt() { 4 | await requires("cargo", "deno"); 5 | await run( 6 | "formatting typescript", 7 | [ 8 | "deno", 9 | "--unstable", 10 | "fmt", 11 | "scripts/", 12 | "test_deps.ts", 13 | "test.ts", 14 | "mod.ts", 15 | ], 16 | true, 17 | ); 18 | 19 | await run("formatting rust", ["cargo", "fmt", "-q"], true); 20 | } 21 | 22 | if (import.meta.main) { 23 | await fmt(); 24 | } 25 | -------------------------------------------------------------------------------- /scripts/lint.ts: -------------------------------------------------------------------------------- 1 | import { requires, run } from "./_util.ts"; 2 | 3 | export async function lint() { 4 | await requires("cargo", "deno"); 5 | await run( 6 | "linting typescript", 7 | [ 8 | "deno", 9 | "--unstable", 10 | "lint", 11 | "scripts", 12 | "test_deps.ts", 13 | "test.ts", 14 | "mod.ts", 15 | ], 16 | true, 17 | ); 18 | 19 | await run("linting rust", ["cargo", "clippy", "-q"], true); 20 | } 21 | 22 | if (import.meta.main) { 23 | await lint(); 24 | } 25 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wasabi" 3 | description = "A template repository for deno modules that want to use wasm" 4 | repository = "https://github.com/denosaurs/wasabi" 5 | license = "MIT" 6 | version = "0.1.3" 7 | authors = ["Elias Sjögreen", "Filippo Rossi"] 8 | edition = "2018" 9 | publish = false 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | wasm-bindgen = "0.2.68" 16 | wee_alloc = { version = "0.4.5", optional = true } 17 | 18 | [profile.release] 19 | lto = true 20 | 21 | [package.metadata.wasm-pack.profile.release] 22 | wasm-opt = ["-Oz", "--enable-mutable-globals"] 23 | 24 | [features] 25 | default = ["wee_alloc"] 26 | -------------------------------------------------------------------------------- /.github/workflows/checks.yml: -------------------------------------------------------------------------------- 1 | name: check 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | lint: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout sources 10 | uses: actions/checkout@v2 11 | 12 | - name: Setup latest deno version 13 | uses: denolib/setup-deno@v2 14 | with: 15 | deno-version: v1.x 16 | 17 | - name: Run deno fmt 18 | run: deno fmt --check --ignore=wasm.js 19 | 20 | - name: Run deno lint 21 | run: deno lint --unstable --ignore=wasm.js 22 | 23 | test: 24 | runs-on: ubuntu-latest 25 | steps: 26 | - name: Checkout sources 27 | uses: actions/checkout@v2 28 | 29 | - name: Setup latest deno version 30 | uses: denolib/setup-deno@v2 31 | with: 32 | deno-version: v1.x 33 | 34 | - name: Run deno test 35 | run: deno test 36 | -------------------------------------------------------------------------------- /scripts/_util.ts: -------------------------------------------------------------------------------- 1 | export async function requires(...executables: string[]) { 2 | const where = Deno.build.os === "windows" ? "where" : "which"; 3 | 4 | for (const executable of executables) { 5 | const process = Deno.run({ 6 | cmd: [where, executable], 7 | stderr: "null", 8 | stdin: "null", 9 | stdout: "null", 10 | }); 11 | 12 | if (!(await process.status()).success) { 13 | console.log(`could not find required build tool ${executable}`); 14 | Deno.exit(1); 15 | } 16 | } 17 | } 18 | 19 | export async function run(msg: string, cmd: string[], output = false) { 20 | console.log(`${msg.padEnd(30, " ")} ("${cmd.join(" ")}")`); 21 | 22 | const process = Deno.run( 23 | { 24 | cmd, 25 | stdout: output ? "inherit" : "null", 26 | stderr: output ? "inherit" : "null", 27 | stdin: output ? "inherit" : "null", 28 | }, 29 | ); 30 | 31 | if (!(await process.status()).success) { 32 | console.log(`${msg} failed`); 33 | Deno.exit(1); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Denosaurs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /scripts/build.ts: -------------------------------------------------------------------------------- 1 | import { requires, run } from "./_util.ts"; 2 | import { compress, encode, minify } from "./_deps.ts"; 3 | 4 | const name = "wasabi"; 5 | const target = "wasm.js"; 6 | const encoder = new TextEncoder(); 7 | 8 | export async function build() { 9 | await requires("cargo", "wasm-pack"); 10 | 11 | if (!(await Deno.stat("Cargo.toml")).isFile) { 12 | console.log(`the build script should be executed in the "${name}" root`); 13 | Deno.exit(1); 14 | } 15 | 16 | await run( 17 | "building rust", 18 | ["wasm-pack", "build", "--target", "web", "--release"], 19 | ); 20 | 21 | const wasm = await Deno.readFile(`pkg/${name}_bg.wasm`); 22 | console.log(`read wasm (size: ${wasm.length} bytes)`); 23 | const compressed = compress(wasm); 24 | console.log( 25 | `compressed wasm using lz4 (reduction: ${ 26 | wasm.length - 27 | compressed.length 28 | } bytes, size: ${compressed.length} bytes)`, 29 | ); 30 | const encoded = encode(compressed); 31 | console.log( 32 | `encoded wasm using base64 (increase: ${ 33 | encoded.length - 34 | compressed.length 35 | } bytes, size: ${encoded.length} bytes)`, 36 | ); 37 | 38 | const init = await Deno.readTextFile(`pkg/${name}.js`); 39 | console.log(`read js (size: ${init.length} bytes)`); 40 | 41 | const source = `import * as lz4 from "https://deno.land/x/lz4@v0.1.2/mod.ts"; 42 | export const source = lz4.decompress(Uint8Array.from(atob("${encoded}"), c => c.charCodeAt(0))); 43 | ${init}`; 44 | console.log(`inlined js and wasm (size: ${source.length} bytes)`); 45 | 46 | const output = await minify(source, { 47 | mangle: { module: true }, 48 | output: { 49 | preamble: `// deno-lint-ignore-file\n// deno-fmt-ignore-file`, 50 | }, 51 | }); 52 | 53 | const reduction = new Blob([source]).size - 54 | new Blob([output.code]).size; 55 | console.log( 56 | `minified js (size reduction: ${reduction} bytes, size: ${output.code.length} bytes)`, 57 | ); 58 | 59 | console.log(`writing output to file (${target})`); 60 | await Deno.writeFile(target, encoder.encode(output.code)); 61 | 62 | const outputFile = await Deno.stat(target); 63 | console.log( 64 | `final size is: ${outputFile.size} bytes`, 65 | ); 66 | } 67 | 68 | if (import.meta.main) { 69 | await build(); 70 | } 71 | -------------------------------------------------------------------------------- /wasm.js: -------------------------------------------------------------------------------- 1 | // deno-lint-ignore-file 2 | // deno-fmt-ignore-file 3 | import*as A from"https://deno.land/x/lz4@v0.1.2/mod.ts";export const source=A.decompress(Uint8Array.from(atob("8AsAYXNtAQAAAAEXBGACf38Bf2AEf39/fwBgAQwA8IABfwADCgkAAQEAAAICAAMEBQFwAQgIBQMBABEGCQF/AUGAgMAACwcQAgZtZW1vcnkCAANhZGQAAwkNAQBBAQsHCAIEBQEHBgrrBwnOBAEHfyABKAIAIgIEQCAAQQJ0IQcDQCACQQhqIQQCQCACKAIIIgZBAXFFBEAgAiEDDAELA0AgBCAGQX5xNgIAAn9BACQA8g0EIgZBfHEiBEUNABpBACAEIAQtAABBAXEbCyEDRgAwACIIIgDhBUUNAEEAIAUgCEECcRsPAPABIAUgBSgCBEEDcSAEcjYCBC4AAlAAkCEECyACIAQEf1EAMCgCACMAAEsAYkF8cXI2AnkAcQUgBgtBA3E4AAARADEAIgIPAMAAIAJBAnEEQCADIAMzABACMgBQCyABIAMcABED4AA1IAMi4ABiDQALCwJALABBfHEiAiMA8A4iBWsgB0kNAAJAIAVBsIDAACAAQcCAwAAoAgARAC0BkWpBCGogAiAHazQAIEsEKABxA3ENAiABILEAEXyKAAODABABgwCwIAMhAgwBCyACQQAOAJACQXhqIgJCADcMAAInAAE0AAOLACAiAVkAEgA1ATEAIAE1AQAPAEMgACAANQEA2gABKQEADwEAEQAQAxEABDMBAacBA4IAICIBHwAwAnIiewAhAkBPAAHYATEoAgDbAWEgAyAAQX0yAAFPAAA3ARAiMQEAXwASA8EAALsAMQhqD0sBAD0BEQIuAAA/AfABQQALjAIBA38jAEEQayIDJHcAAVsCAIkAUDYCDAJ/CwLgQQJqIgEgAWwiAUGAECAFAKJLGyIFIANBDGoQhgIQBFkAEAxXAIAFQQJ0IQYMAZoBAAwAcSIGQaCAASAGANBLG0GHgARqIgJBEHZA2wAwf0cE0wBAEHQiAVwBEgShAPIBDDYCCCABIAEgAkGAgHxxagkCAJoARDYCDCB4ACchAnYAIQINogEFEQBwC0EAIQJBARQAAaoBAWoCIyAGSwCQQQALIQEgACACcwAQAFcA0AAgA0EQaiQAC2oAAn/xAOB0IgEgA0EDdEGAgAFqIh0CFAK+ABIBvgCjAkF/RgRAQQAhA2gAAMcAEgNtABADrQAIvQAAcgAwAiAAygIAcgAAgQEgCwcSAqABagsFAEGABAsE6AMQBCkA0gQAIAELAwABCwtOAQAZBBBFWgQAAQAACACxAgAAAAMAAAAEAAAQAAAIAAAEAJMFAAAABgAAAAcYAAABAAAIAAYwAPBtewlwcm9kdWNlcnMCCGxhbmd1YWdlAQRSdXN0AAxwcm9jZXNzZWQtYnkDBXJ1c3RjHTEuNjAuMCAoNzczN2UwYjVjIDIwMjItMDQtMDQpBndhbHJ1cwYwLjE4LjAMd2FzbS1iaW5kZ2VuEjAuMi42OCAoYTA0ZTE4OTcxKQ=="),A=>A.charCodeAt(0)));let t;export function add(A,B){return t.add(A,B)}async function B(A,t){if("function"==typeof Response&&A instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(A,t)}catch(t){if("application/wasm"==A.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const B=await A.arrayBuffer();return await WebAssembly.instantiate(B,t)}{const B=await WebAssembly.instantiate(A,t);return B instanceof WebAssembly.Instance?{instance:B,module:A}:B}}async function e(A){void 0===A&&(A=import.meta.url.replace(/\.js$/,"_bg.wasm"));("string"==typeof A||"function"==typeof Request&&A instanceof Request||"function"==typeof URL&&A instanceof URL)&&(A=fetch(A));const{instance:E,module:n}=await B(await A,{});return t=E.exports,e.__wbindgen_wasm_module=n,t}export default e; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wasabi 2 | 3 | This is a template repository for deno modules that want to use wasm. To use it 4 | simply click the 5 | ["Use this template"](https://github.com/denosaurs/wasabi/generate) button to 6 | generate a new repo with all the stuff you need to get started writing rust and 7 | running it using wasm in deno. 8 | 9 | ## Prerequisites 10 | 11 | | prerequisite | installation | 12 | | ------------------------------------------------------- | -------------------------------------------------------- | 13 | | [deno](https://deno.land/) | [deno_install](https://github.com/denoland/deno_install) | 14 | | [rust](https://www.rust-lang.org/) | [rustup](https://www.rust-lang.org/tools/install) | 15 | | [rustfmt](https://github.com/rust-lang/rustfmt) | `rustup component add rustfmt` | 16 | | [rust-clippy](https://github.com/rust-lang/rust-clippy) | `rustup component add clippy` | 17 | | [wasm-pack](https://rustwasm.github.io/wasm-pack/) | `cargo install wasm-pack` | 18 | 19 | ## Structure 20 | 21 | ``` 22 | ├── .github 23 | │ ├── workflows 24 | │ │ ├── checks.yml - Performs deno lint, fmt and test 25 | │ │ └── depsbot.yml - Checks the freshness of deno dependencies 26 | │ └── FUNDING.yml - The denosaurs funding file, omit if not denosaur 27 | ├── scripts - A directory containing all development scripts 28 | │ ├── _deps.ts - All of the dependencies for the scripts 29 | │ ├── _util.ts - Utilities used in the scripts 30 | │ ├── build.ts - The build script for generating the wasm.js file 31 | │ ├── clean.ts - Removes all build data, often solving build issues 32 | │ ├── fmt.ts - Formats both typescript and rust ignoring build data 33 | │ └── lint.ts - Lints both typescript and rust ignoring build data 34 | ├── src - The rust part of the module 35 | │ └── lib.rs - The rust entry point 36 | ├── pkg - Ignored by .gitignore, used when building 37 | ├── target - Ignored by .gitignore, used when building 38 | ├── .gitignore - A standard .gitignore file for ignoring build directories 39 | ├── .rustfmt.toml - The rustfmt configuration 40 | ├── Cargo.toml - A file describing the rust part of the module 41 | ├── LICENSE - A standard license file you are free to change to fit your needs 42 | ├── mod.ts - The entry point for the deno module 43 | ├── README.md - This readme file 44 | ├── test.ts - Containing tests 45 | └── wasm.js - A js file containing the built wasm and some glue code generated by the build script 46 | ``` 47 | 48 | ## Scripts 49 | 50 | ### build 51 | 52 | ```bash 53 | $ deno run --unstable --allow-read --allow-write --allow-run scripts/build.ts 54 | building rust ("wasm-pack build --target web --release") 55 | read wasm (size: 1274 bytes) 56 | compressed wasm using lz4 (reduction: 224 bytes, size: 1050 bytes) 57 | encoded wasm using base64 (increase: 350 bytes, size: 1400 bytes) 58 | read js (size: 1776 bytes) 59 | inlined js and wasm (size: 3357 bytes) 60 | minified js (size reduction: 754 bytes, size: 2603 bytes) 61 | writing output to file (wasm.js) 62 | final size is: 2603 bytes 63 | ``` 64 | 65 | ### clean 66 | 67 | ```bash 68 | $ deno run --unstable --allow-read --allow-write --allow-run scripts/clean.ts 69 | cleaning cargo build ("cargo clean") 70 | removing pkg 71 | ``` 72 | 73 | ### fmt 74 | 75 | ```bash 76 | $ deno run --unstable --allow-run scripts/fmt.ts 77 | formatting typescript ("deno --unstable fmt scripts/ test_deps.ts test.ts mod.ts") 78 | Checked 9 files 79 | formatting rust ("cargo fmt") 80 | ``` 81 | 82 | ### lint 83 | 84 | ```bash 85 | $ deno run --unstable --allow-run scripts/lint.ts 86 | linting typescript ("deno --unstable lint scripts test_deps.ts test.ts mod.ts") 87 | Checked 9 files 88 | linting rust ("cargo clippy -q") 89 | ``` 90 | 91 | ## Testing 92 | 93 | Requires the `wasm.js` file to be [built](#build) first. 94 | 95 | ```bash 96 | $ deno test 97 | running 1 tests 98 | test add ... ok (2ms) 99 | 100 | test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (2ms) 101 | ``` 102 | 103 | ## Other 104 | 105 | ### Contribution 106 | 107 | Pull request, issues and feedback are very welcome. Code style is formatted with 108 | `deno fmt` and commit messages are done following 109 | [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec. 110 | 111 | ### Licence 112 | 113 | Copyright 2020, Denosaurs. All rights reserved. MIT license. 114 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "bumpalo" 5 | version = "3.4.0" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" 8 | 9 | [[package]] 10 | name = "cfg-if" 11 | version = "0.1.10" 12 | source = "registry+https://github.com/rust-lang/crates.io-index" 13 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 14 | 15 | [[package]] 16 | name = "lazy_static" 17 | version = "1.4.0" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 20 | 21 | [[package]] 22 | name = "libc" 23 | version = "0.2.71" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" 26 | 27 | [[package]] 28 | name = "log" 29 | version = "0.4.8" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 32 | dependencies = [ 33 | "cfg-if", 34 | ] 35 | 36 | [[package]] 37 | name = "memory_units" 38 | version = "0.4.0" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" 41 | 42 | [[package]] 43 | name = "proc-macro2" 44 | version = "1.0.18" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" 47 | dependencies = [ 48 | "unicode-xid", 49 | ] 50 | 51 | [[package]] 52 | name = "quote" 53 | version = "1.0.6" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea" 56 | dependencies = [ 57 | "proc-macro2", 58 | ] 59 | 60 | [[package]] 61 | name = "syn" 62 | version = "1.0.30" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "93a56fabc59dce20fe48b6c832cc249c713e7ed88fa28b0ee0a3bfcaae5fe4e2" 65 | dependencies = [ 66 | "proc-macro2", 67 | "quote", 68 | "unicode-xid", 69 | ] 70 | 71 | [[package]] 72 | name = "unicode-xid" 73 | version = "0.2.0" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 76 | 77 | [[package]] 78 | name = "wasabi" 79 | version = "0.1.3" 80 | dependencies = [ 81 | "wasm-bindgen", 82 | "wee_alloc", 83 | ] 84 | 85 | [[package]] 86 | name = "wasm-bindgen" 87 | version = "0.2.68" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" 90 | dependencies = [ 91 | "cfg-if", 92 | "wasm-bindgen-macro", 93 | ] 94 | 95 | [[package]] 96 | name = "wasm-bindgen-backend" 97 | version = "0.2.68" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" 100 | dependencies = [ 101 | "bumpalo", 102 | "lazy_static", 103 | "log", 104 | "proc-macro2", 105 | "quote", 106 | "syn", 107 | "wasm-bindgen-shared", 108 | ] 109 | 110 | [[package]] 111 | name = "wasm-bindgen-macro" 112 | version = "0.2.68" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" 115 | dependencies = [ 116 | "quote", 117 | "wasm-bindgen-macro-support", 118 | ] 119 | 120 | [[package]] 121 | name = "wasm-bindgen-macro-support" 122 | version = "0.2.68" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" 125 | dependencies = [ 126 | "proc-macro2", 127 | "quote", 128 | "syn", 129 | "wasm-bindgen-backend", 130 | "wasm-bindgen-shared", 131 | ] 132 | 133 | [[package]] 134 | name = "wasm-bindgen-shared" 135 | version = "0.2.68" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" 138 | 139 | [[package]] 140 | name = "wee_alloc" 141 | version = "0.4.5" 142 | source = "registry+https://github.com/rust-lang/crates.io-index" 143 | checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" 144 | dependencies = [ 145 | "cfg-if", 146 | "libc", 147 | "memory_units", 148 | "winapi", 149 | ] 150 | 151 | [[package]] 152 | name = "winapi" 153 | version = "0.3.8" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 156 | dependencies = [ 157 | "winapi-i686-pc-windows-gnu", 158 | "winapi-x86_64-pc-windows-gnu", 159 | ] 160 | 161 | [[package]] 162 | name = "winapi-i686-pc-windows-gnu" 163 | version = "0.4.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 166 | 167 | [[package]] 168 | name = "winapi-x86_64-pc-windows-gnu" 169 | version = "0.4.0" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 172 | --------------------------------------------------------------------------------