Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common_service/socket/src/apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub fn smol_send(handle: SockFd, data: &[u8]) -> SmoltcpResult<()> {

#[no_mangle]
pub fn smol_recv(handle: SockFd, buf: &mut [u8]) -> SmoltcpResult<Size> {
// println!("smol_recv");
println!("smol_recv");
let mut iface = acquire_iface()?;
let mut sockets = acquire_sockets()?;

Expand Down
3 changes: 2 additions & 1 deletion common_service/socket/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ lazy_static! {
iface.update_ip_addrs(|ip_addrs| {
ip_addrs
.push(IpCidr::new(
IpAddress::v4(192, 168, 69, init_context::isolation_ctx().isol_id as u8),
// IpAddress::v4(192, 168, 69, init_context::isolation_ctx().isol_id as u8),
IpAddress::v4(192, 168, 69, 1),
24,
))
.unwrap();
Expand Down
10 changes: 7 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set positional-arguments

enable_mpk := "0"
enable_pkey_per_func := "1"
enable_pkey_per_func := "0"

enable_release := "0"

Expand All @@ -26,8 +26,11 @@ release_flag := if enable_release == "1" {
"--release"
} else { "" }

all_rust:
# ./scripts/build_user.sh
all_libos:
./scripts/build_all_common{{ if enable_mpk == "1" { "_mpk" } else { "" } }}.sh {{ release_flag }}

all_rust:
just all_libos
./scripts/build_user.sh {{ release_flag }} {{ cmd_flag }}

cc_flags_p1 := "-Wl,--gc-sections -nostdlib -Wl,--whole-archive"
Expand Down Expand Up @@ -97,6 +100,7 @@ c_checker_so:
-o target/{{target}}/debug/libwasmtime_checker.so

run_rust_test:
just all_libos
just all_rust
./scripts/run_tests.sh {{ cmd_flag }}

Expand Down
1 change: 0 additions & 1 deletion scripts/build_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ for file in $(find user -name 'Cargo.toml' \
-not -path 'user/httpd/Cargo.toml' \
-not -path 'user/should_panic/Cargo.toml' \
-not -path 'user/load_all/Cargo.toml' \
-not -path 'user/simple_http/Cargo.toml' \
-not -path 'user/never_stop/Cargo.toml' \
-not -path 'user/tinywasm*/Cargo.toml' \
-not -path 'user/wasmtime*/Cargo.toml'); do
Expand Down
2 changes: 2 additions & 0 deletions user/simple_http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ ms_std = { path = "../../ms_std", features = ["unwinding", "alloc_def"] }

[features]
mpk = ["ms_std/mpk"]
pkey_per_func = ["mpk"]

default = []
3 changes: 2 additions & 1 deletion user/simple_http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use ms_std::{agent::FaaSFuncResult as Result, net::TcpStream, println};

#[no_mangle]
pub fn main() -> Result<()> {
let mut stream = TcpStream::connect("192.168.69.100:9999".into())?;
let mut stream = TcpStream::connect("www.baidu.com".into())?;
println!("tcp connection created.");
stream.write_all(b"GET / HTTP/1.0\r\n\r\n")?;
let mut buffer = [0; 4096];
// println!("send data finish.");
Expand Down
Loading