ricky.codes
+---------------+
|.-------------.|
|| ricky ||
|| dot ||
|| codes ||
||$ ./build.sh ||
|+-------------+|
+-..---------..-+
.---------------.
/ /=============\ \
/ /===============\ \
/_____________________\
\_____________________/
My personal website built with Rust using cargo-web and stdweb
Disclaimer
stdweb seems to be now defunct (hasn't been updated since 2019). You might be better off exploring alternatives like wasm bingen. That's what everyone else is doing.
If you still want to play with this I am building it on nightly-2019-08-01-x86_64-unknown-linux-gnu
re: #8
Build
you will need cargo web
cargo web build --target=wasm32-unknown-unknown
or you can use the handy build script:
bash build.sh
I haven't tested other targets, but emscripten should work
You should see something like:
warning: debug builds on the wasm32-unknown-unknown are currently totally broken
forcing a release build
Finished release [optimized] target(s) in 0.0 secs
Running local web server
cargo web start --target=wasm32-unknown-unknown
or you can use the handy build script:
bash build.sh --serve
You should see something like:
warning: debug builds on the wasm32-unknown-unknown are currently totally broken
forcing a release build
Finished release [optimized] target(s) in 0.0 secs
If you need to serve any extra files put them in the 'static' directory
in the root of your crate; they will be served alongside your application.
You can also put a 'static' directory in your 'src' directory.
Your application is being served at '/rickycodes.js'. It will be automatically
rebuilt if you make any changes in your code.
You can access the web server at `http://[::1]:8000`.
License
Licensed under
- MIT license (LICENSE or http://opensource.org/licenses/MIT)