mirror of
https://github.com/fluencelabs/marine.git
synced 2024-12-12 14:55:32 +00:00
use relative paths in the IPFS node example
This commit is contained in:
parent
b1e7eae29b
commit
f2855e466b
@ -19,12 +19,9 @@ use fluence_faas::IValue;
|
|||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
const IPFS_MODULES_DIR: &str = "/Users/mike/dev/work/fluence/wasm/fce/bin/wasm_modules";
|
const IPFS_MODULES_DIR: &str = "../../bin/wasm_modules";
|
||||||
|
const IPFS_MODULES_CONFIG_PATH: &str = "Config.toml";
|
||||||
const IPFS_MODULES_CONFIG_PATH: &str =
|
const IPFS_RPC: &str = "../../bin/wasm_ipfs_rpc_wit.wasi.wasm";
|
||||||
"/Users/mike/dev/work/fluence/wasm/fce/examples/ipfs_node/Config.toml";
|
|
||||||
|
|
||||||
const IPFS_RPC: &str = "/Users/mike/dev/work/fluence/wasm/fce/bin/wasm_ipfs_rpc_wit.wasi.wasm";
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let ipfs_rpc = std::fs::read(IPFS_RPC).unwrap();
|
let ipfs_rpc = std::fs::read(IPFS_RPC).unwrap();
|
||||||
@ -44,7 +41,7 @@ fn main() {
|
|||||||
println!("ipfs node addresses are:\n{:?}", node_addresses);
|
println!("ipfs node addresses are:\n{:?}", node_addresses);
|
||||||
|
|
||||||
let result = ipfs_node
|
let result = ipfs_node
|
||||||
.call_code(&ipfs_rpc, "put", &[IValue::String("asdasdasd".to_string())])
|
.call_code(&ipfs_rpc, "put", &[IValue::String("hello, world!".to_string())])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
println!("execution result {:?}", result);
|
println!("execution result {:?}", result);
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# Fluence FaaS
|
# Fluence FaaS
|
||||||
|
|
||||||
Fluence FaaS is intended to run various Wasm binaries. At now, it is in the heavily developing phase.
|
Fluence FaaS is intended to run various Wasm binaries. At now, it is in the heavily developing phase. For more details please see the IPFS [example](https://github.com/fluencelabs/fce/tree/master/examples/ipfs_node).
|
||||||
|
Loading…
Reference in New Issue
Block a user