Sign in
gn
/
gn
/
e44942b445d9376451f7d519965dae036efde5bc
/
.
/
examples
/
rust_example
/
hello_world
/
foo
/
src
/
lib.rs
blob: d4d20607df2a6ab70ff208dd915ee9ede6ceba21 [
file
]
#[
derive
(
Debug
)]
pub
struct
Foo
{
s
:
&
'
static
str
,
i
:
&
'
static
str
}
impl
Foo
{
pub
fn
new
(
s
:
&
'
static
str
)
->
Foo
{
Foo
{
s
:
s
,
i
:
"foo"
}
}
}
#[
no_mangle
]
pub
extern
"C"
fn
call_from_c
()
->
i32
{
42
}