greeting and readme: lib.rs -> main.rs

This commit is contained in:
DieMyst 2020-07-18 15:44:02 +03:00
parent f8a160901b
commit eb45acd95b
3 changed files with 8 additions and 6 deletions

View File

@ -23,10 +23,9 @@ FCE is intended to run various Wasm binaries. At now, it is in the heavily devel
- `Config.toml`: - `Config.toml`:
``` ```
[lib] [[bin]]
name = "wasm_application" name = "wasm_application"
path = "src/lib.rs" path = "src/main.rs"
crate-type = ["cdylib"]
[dependencies] [dependencies]
// logger - if you'll use logging // logger - if you'll use logging

View File

@ -4,10 +4,9 @@ version = "0.1.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
[lib] [[bin]]
name = "greeting" name = "greeting"
path = "src/lib.rs" path = "src/main.rs"
crate-type = ["cdylib"]
[dependencies] [dependencies]
fluence = { git = "https://github.com/fluencelabs/rust-sdk" } fluence = { git = "https://github.com/fluencelabs/rust-sdk" }

View File

@ -16,6 +16,10 @@
use fluence::fce; use fluence::fce;
pub fn main() {
}
#[fce] #[fce]
pub fn greeting(name: String) -> String { pub fn greeting(name: String) -> String {
format!("Hi, {}", name) format!("Hi, {}", name)