Skip to content

Commit

Permalink
fix repo
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuravlevma committed Mar 1, 2022
1 parent 9a94d1c commit 7060103
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .idea/wasm-rust.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "wasm-rust"
name = "wasm-trunk-vanilla"
version = "0.1.0"
edition = "2021"
authors = ["Zhuravlev Maksim <[email protected]>"]
description = "It's a simple library to course OTUS Rust developer"
license = "MIT OR Apache-2.0"
rust-version = "1.56"
readme = "README.md"
repository = "https://github.com/zhuravlevma/wasm-rust"
homepage = "https://github.com/zhuravlevma/wasm-rust"
repository = "https://github.com/zhuravlevma/wasm-trunk-vanilla"
homepage = "https://github.com/zhuravlevma/wasm-trunk-vanilla"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as __wbg_star0 from './snippets/wasm-rust-17c3905acb888efa/inline0.js';
import * as __wbg_star0 from './snippets/wasm-trunk-vanilla-16414769075dcd74/inline0.js';

let wasm;

Expand Down Expand Up @@ -220,7 +220,7 @@ async function load(module, imports) {

async function init(input) {
if (typeof input === 'undefined') {
input = new URL('index-abd08041d091388c_bg.wasm', import.meta.url);
input = new URL('index-22264b0565f1af3a_bg.wasm', import.meta.url);
}
const imports = {};
imports.wbg = {};
Expand Down Expand Up @@ -307,7 +307,7 @@ async function init(input) {
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
};
imports['./snippets/wasm-rust-17c3905acb888efa/inline0.js'] = __wbg_star0;
imports['./snippets/wasm-trunk-vanilla-16414769075dcd74/inline0.js'] = __wbg_star0;

if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
input = fetch(input);
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<meta charset="UTF-8">
<title>Title</title>

<link rel="preload" href="/index-abd08041d091388c_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/index-abd08041d091388c.js"></head>
<link rel="preload" href="/index-22264b0565f1af3a_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/index-22264b0565f1af3a.js"></head>
<body>
<script type="module">import init from '/index-abd08041d091388c.js';init('/index-abd08041d091388c_bg.wasm');</script>
<script type="module">import init from '/index-22264b0565f1af3a.js';init('/index-22264b0565f1af3a_bg.wasm');</script>

<script>(function () {
var url = 'ws://' + window.location.host + '/_trunk/ws';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export function snippetTest() { console.log('Hello from JS FFI!'); }
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<title>Title</title>
</head>
<body>
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-bin="wasm-rust"/>
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-bin="wasm-trunk-vanilla"/>
</body>
</html>

0 comments on commit 7060103

Please sign in to comment.