Skip to content

Commit

Permalink
Update project layout
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish committed Jan 21, 2019
1 parent ede9c5d commit 8a87751
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rust-embedder-app/Cargo.toml → Cargo.toml
Expand Up @@ -6,4 +6,4 @@ edition = "2018"

[dependencies]
wasmer-clif-backend = { git = "https://github.com/wasmerio/wasmer", branch = "feature/vm_refactor" }
wasmer-runtime = { git = "https://github.com/wasmerio/wasmer", branch = "feature/vm_refactor" }
wasmer-runtime = { git = "https://github.com/wasmerio/wasmer", branch = "feature/vm_refactor" }
14 changes: 10 additions & 4 deletions README.md
@@ -1,7 +1,13 @@
# Example of Using Wasmer from Rust
# Rust Embedder App Example
Blog post

See the blog post for these examples:

The `rust-embedder-app` directory contains an example of embedding wasmer in a rust application.
See `src/main.rs` for the example implementation.

The `wasm-sample-app` directory contains an example rust wasm app to run in the embedder app.

## Requirements
- Rust target `wasm32-unknown-unknown` - install using `rustup target add wasm32-unknown-unknown`

## Running
`cd wasm-sample-app && cargo build --release && cd ..`
`cargo run`
5 changes: 0 additions & 5 deletions rust-embedder-app/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion rust-embedder-app/src/main.rs → src/main.rs
Expand Up @@ -18,7 +18,7 @@ use wasmer_runtime::{
fn main() {
// Read the wasm bytes of our sample application
let mut wasm_file =
File::open("../wasm-sample-app/target/wasm32-unknown-unknown/release/wasm_sample_app.wasm")
File::open("./wasm-sample-app/target/wasm32-unknown-unknown/release/wasm_sample_app.wasm")
.unwrap();
let mut wasm_bytes = Vec::new();
wasm_file.read_to_end(&mut wasm_bytes).unwrap();
Expand Down

0 comments on commit 8a87751

Please sign in to comment.