mirror of
https://github.com/plasma-umass/coz.git
synced 2024-10-26 07:39:17 +03:00
2f12e6e4f3
After seeing a recording of Emery's recent talk at Strange Loop I was super impressed with `coz` and immediately wanted to try it out with Rust code! I was curious to see if `coz` could help us out with profiling either Cargo, Rust's build system, or perhaps the compiler itself, `rustc`. In any case I ended up creating https://github.com/alexcrichton/coz-rs as a repository to house an implementation of `coz.h` for Rust so `coz` could be used to easily work with Rust executables. I toyed around a bit and Emery [mentioned] that this would be good support to have upstream once it's working, and I think it's working now! I haven't been able to get a ton of useful results myself yet, but I'm still figuring out the best way to ask `coz` questions and the best way to instrument programs myself. Nonetheless I think that the Rust support here is correct in the sense that it's a faithful translation of `coz.h`, and now it's just a problem with me learning how best to instrument programs. This commit adds a new `rust` directory with a crate (Rust parlance for "library") which provides macros that allow using `coz` instrumentation similar as you would in C, except in idiomatic Rust style. I've published the crate on Rust's package registry, crates.io, as [`coz`][crate], and I don't mind keeping it there or transferring it to y'all, whichever you'd prefer! I also don't mind being on the hook for reviewing any Rust-related changes, or if y'all need to jettison the Rust support in the future I don't mind that either and can give it a home! [mentioned]: https://github.com/alexcrichton/coz-rs/issues/2 [crate]: https://crates.io/crates/coz
19 lines
391 B
TOML
19 lines
391 B
TOML
[package]
|
|
name = "coz"
|
|
version = "0.1.2"
|
|
authors = ["Alex Crichton <alex@alexcrichton.com>"]
|
|
edition = "2018"
|
|
repository = "https://github.com/plasma-umass/coz"
|
|
license-file = "../LICENSE.md"
|
|
readme = "README.md"
|
|
description = """
|
|
Rust support for the `coz` Causal Profiler: https://github.com/plasma-umass/coz
|
|
"""
|
|
|
|
[dependencies]
|
|
libc = "0.2"
|
|
once_cell = "1.1"
|
|
|
|
[profile.release]
|
|
debug = 1
|