-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5536d0a
commit 83b1a61
Showing
10 changed files
with
168 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
vm/examples/hello-world2/app/Cargo.lock → vm/examples/hello-world2/app-2015/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[package] | ||
name = "hello_world2_2015" | ||
version = "0.1.0" | ||
authors = ["Fluence Labs"] | ||
publish = false | ||
description = "Just a demo application for Fluence with logging ability" | ||
|
||
[lib] | ||
name = "hello_world2_2015" | ||
path = "src/lib.rs" | ||
crate-type = ["cdylib"] | ||
|
||
[profile.release] | ||
debug = false | ||
lto = true | ||
opt-level = "z" | ||
panic = "abort" | ||
|
||
[dependencies] | ||
log = "0.4" | ||
fluence = { version = "0.0.10", features = ["export_allocator", "wasm_logger"] } |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2018 Fluence Labs Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
//! A simple demo application for Fluence. | ||
#![feature(custom_attribute)] | ||
extern crate fluence; | ||
|
||
extern crate log; | ||
|
||
use fluence::sdk::*; | ||
use log::info; | ||
|
||
fn init() { | ||
logger::WasmLogger::init_with_level(log::Level::Info).unwrap(); | ||
} | ||
|
||
#[invocation_handler(init_fn = init)] | ||
fn greeting(name: String) -> String { | ||
info!("{} has been successfully greeted", name); | ||
format!("Hello, world! From user {}", name) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
vm/examples/hello-world2/app/Cargo.toml → vm/examples/hello-world2/app-2018/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nightly |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters