File tree 38 files changed +39
-39
lines changed
guide-supported-types-examples
38 files changed +39
-39
lines changed Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server -p"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"html-webpack-plugin" : " ^3.2.0" ,
9
9
"text-encoding" : " ^0.7.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- const rust = import ( './pkg/add ' ) ;
3
+ const rust = import ( './pkg' ) ;
4
4
rust
5
5
. then ( m => alert ( '1 + 2 = ' + m . add ( 1 , 2 ) ) )
6
6
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server -p"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"html-webpack-plugin" : " ^3.2.0" ,
9
9
"text-encoding" : " ^0.7.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example.
3
- import ( './pkg/canvas ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-unused-vars */
2
2
import { chars } from './chars-list.js' ;
3
- let imp = import ( './pkg/char ' ) ;
3
+ let imp = import ( './pkg' ) ;
4
4
let mod ;
5
5
6
6
let counters = [ ] ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- import ( './pkg/closures ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- import ( './pkg/console_log ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- import ( './pkg/dom ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example.
3
- import ( './pkg/rust_duck_typed_interfaces ' ) ;
3
+ import ( './pkg' ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
- const rust = import ( './pkg/fetch ' ) ;
1
+ const rust = import ( './pkg' ) ;
2
2
3
3
rust
4
4
. then ( m => {
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// Note that a dynamic `import` statement here is required due to
2
- // webpack/webpack#6615, but in theory `import { greet } from './pkg/hello_world ';`
2
+ // webpack/webpack#6615, but in theory `import { greet } from './pkg';`
3
3
// will work here one day as well!
4
- const rust = import ( './pkg/hello_world ' ) ;
4
+ const rust = import ( './pkg' ) ;
5
5
6
6
rust
7
7
. then ( m => m . greet ( 'World!' ) )
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- import ( './crate/pkg/import_js ' )
3
+ import ( './crate/pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
- import ( './pkg/julia_set ' )
1
+ import ( './pkg' )
2
2
. then ( wasm => {
3
3
const canvas = document . getElementById ( 'drawing' ) ;
4
4
const ctx = canvas . getContext ( '2d' ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example.
3
- import ( './pkg/wasm_bindgen_paint ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- import ( './pkg/performance ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- import ( './pkg/request_animation_frame ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- const rust = import ( './pkg/todomvc ' ) ;
3
+ const rust = import ( './pkg' ) ;
4
4
5
5
rust
6
6
. then ( m => m . run ( ) )
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example
3
- import ( './pkg/wasm_in_wasm ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
- import ( './pkg/webaudio ' )
1
+ import ( './pkg' )
2
2
. then ( rust_module => {
3
3
let fm = null ;
4
4
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
Original file line number Diff line number Diff line change 1
1
// For more comments about what's going on here, check out the `hello_world`
2
2
// example.
3
- import ( './pkg/webgl ' )
3
+ import ( './pkg' )
4
4
. catch ( console . error ) ;
Original file line number Diff line number Diff line change 4
4
"serve" : " webpack-dev-server"
5
5
},
6
6
"devDependencies" : {
7
- "@wasm-tool/wasm-pack-plugin" : " 0.4.2 " ,
7
+ "@wasm-tool/wasm-pack-plugin" : " 1.0.1 " ,
8
8
"text-encoding" : " ^0.7.0" ,
9
9
"html-webpack-plugin" : " ^3.2.0" ,
10
10
"webpack" : " ^4.29.4" ,
You can’t perform that action at this time.
0 commit comments