acl-dev / open-coroutine Goto Github PK
View Code? Open in Web Editor NEWThe open-coroutine is a simple, efficient and generic stackful-coroutine library.
License: Apache License 2.0
The open-coroutine is a simple, efficient and generic stackful-coroutine library.
License: Apache License 2.0
run failed
run successfully
[dependencies]
libc = "0.2.119"
base-coroutine = "0.0.1"
open-coroutine = "0.0.1"
use base_coroutine::OpenYielder;
use open_coroutine::co;
use std::os::raw::c_void;
fn main() {
extern "C" fn f1(
_yielder: &OpenYielder<Option<&'static mut c_void>>,
_input: Option<&'static mut c_void>,
) -> Option<&'static mut c_void> {
println!("hello1 from coroutine");
None
}
co(f1, None, 2048);
extern "C" fn f2(
_yielder: &OpenYielder<Option<&'static mut c_void>>,
_input: Option<&'static mut c_void>,
) -> Option<&'static mut c_void> {
println!("hello2 from coroutine");
None
}
co(f2, None, 2048);
unsafe {
libc::sleep(1);
}
}
open-coroutine version(s):
error: linking with cc
failed: exit status: 1
|
= note: "cc" "-arch" "arm64" "/var/folders/yv/k8yn4gt95zbgqvmv4pkx0zfw0000gn/T/rustcxSewLr/symbols.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.2m6f053bv5v2znn9.rcgu.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.3pk1jj45xptudnpg.rcgu.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.3swcxoaurcdh28pl.rcgu.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.4gwpj4tr63m7ppnt.rcgu.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.4z1itdfg8o4xapbj.rcgu.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.5ef6y44j888sl2j3.rcgu.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.wnngfpdgapu04xv.rcgu.o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d.2iiyqsgczzjoa0dq.rcgu.o" "-L" "/Users/admin/Downloads/study/rust-study/target/debug/deps" "-L" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libopen_coroutine-a8f3e2d950a92730.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libbase_coroutine-12832087162b6da7.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libonce_cell-0f1302befc59200f.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libtimer_utils-8138146dbd419fc4.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libobject_collection-9509479e2f448b54.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libcorosensei-95c540b47f02f612.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/liblibc-3f493df9e27c93d1.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libscopeguard-d7dce28efe117e2a.rlib" "/Users/admin/Downloads/study/rust-study/target/debug/deps/libcfg_if-a08cfa42db5d7bec.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-f6811f31090e0239.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-585aa2ea4819ce90.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-1b4ea1dc4a3823f8.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-f653b27121920f5c.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-ef1f6d7964edf865.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-8d0a95997d48da47.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-68d9470ea5ba2fa3.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-d4ed7f63db7e9953.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-d2ad324cf0492211.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-a00c8eba7ff52d83.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libadler-92e25d254b309fb5.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-9cf27ed549592a86.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-ebee0ebd9a510319.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-718033b8fe200c22.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-5ec3532fb120beec.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-80ef5ce8d4cd7e19.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-b5600cb14c277fae.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-760870d297bc6b81.rlib" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-931e7dc6a4f959e6.rlib" "-lhook" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/Users/admin/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/Users/admin/Downloads/study/rust-study/target/debug/deps/43test_hook-1094d3b3ce98550d" "-Wl,-dead_strip" "-nodefaultlibs"
= note: ld: library not found for -lhook
clang: error: linker command failed with exit code 1 (use -v to see invocation)
No response
No response
No response
No response
No response
No response
No response
No response
No response
No response
No response
No response
No response
No response
open-coroutine version(s):
No response
No response
No response
No response
No response
No response
No response
run failed.
run successfully.
cargo clean
cargo run --example 02hooked_echo_server
libfiber-rs version(s): current
server started !
Exception: EXC_BAD_ACCESS (code=1, address=0x30)
nop
No response
No response
No response
No response
No response
No response
No response
02hooked_echo_server.rs
;02base_echo_client.rs
;libfiber-rs version(s): master
No response
echo_client 110
echo_client 110
echo_client 110
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.