mirror of
https://github.com/fluencelabs/marine.git
synced 2025-06-28 06:01:37 +00:00
adjust ipfs rpc module to use wasi
This commit is contained in:
@ -20,6 +20,7 @@ mod config;
|
||||
mod imports;
|
||||
mod node_public_interface;
|
||||
|
||||
use fce::IValue;
|
||||
use node::IpfsNode;
|
||||
|
||||
use std::path::PathBuf;
|
||||
@ -34,16 +35,17 @@ const IPFS_RPC: &str = "/Users/mike/dev/work/fluence/wasm/fce/bin/wasm_ipfs_rpc_
|
||||
fn main() {
|
||||
let ipfs_rpc = std::fs::read(IPFS_RPC).unwrap();
|
||||
|
||||
let mut ipfs_node = crate::IpfsNode::new(
|
||||
let mut ipfs_node = IpfsNode::new(
|
||||
PathBuf::from(IPFS_MODULES_DIR),
|
||||
PathBuf::from(IPFS_MODULES_CONFIG_PATH),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
println!("ipfs node interface is\n{}", ipfs_node.get_interface());
|
||||
|
||||
println!("ipfs node interface is {}", ipfs_node.get_interface());
|
||||
|
||||
let result = ipfs_node.rpc_call(&ipfs_rpc, &[]).unwrap();
|
||||
let result = ipfs_node
|
||||
.rpc_call(&ipfs_rpc, &[IValue::String("asdsad".to_string())])
|
||||
.unwrap();
|
||||
|
||||
println!("execution result {:?}", result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user