diff options
| author | Adam C. Foltzer <acfoltzer@galois.com> | 2017-06-09 14:51:58 -0700 |
|---|---|---|
| committer | Adam C. Foltzer <acfoltzer@galois.com> | 2017-06-09 15:14:02 -0700 |
| commit | bdd4c45b173055931db1c758cd7f016693d3a924 (patch) | |
| tree | a868e261a3771996dbd3c1dd03c5bac049f60389 /test cases/rust/4 polyglot/stuff.rs | |
| parent | 22cfd44221ada3219d9096e15dc8b00d32e0f9f6 (diff) | |
| download | meson-bdd4c45b173055931db1c758cd7f016693d3a924.tar.gz | |
Enhance Rust support
- Adds a `crate_type` kwarg to library targets, allowing the different
types of Rust [linkage][1].
- Shared libraries use the `dylib` crate type by default, but can also
be `cdylib`
- Static libraries use the `rlib` crate type by default, but can also
be `staticlib`
- If any Rust target has shared library dependencies, add the
appropriate linker arguments, including rpath for the sysroot of the
Rust compiler
[1]: https://doc.rust-lang.org/reference/linkage.html
Diffstat (limited to 'test cases/rust/4 polyglot/stuff.rs')
| -rw-r--r-- | test cases/rust/4 polyglot/stuff.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test cases/rust/4 polyglot/stuff.rs b/test cases/rust/4 polyglot/stuff.rs new file mode 100644 index 000000000..ecf623c64 --- /dev/null +++ b/test cases/rust/4 polyglot/stuff.rs @@ -0,0 +1,6 @@ +#![crate_name = "stuff"] + +#[no_mangle] +pub extern fn f() { + println!("Hello from Rust!"); +} |
