Rust at Sentry

Rust at Sentry

An introduction to how we use Rust at Sentry.

181de1fb11dffe39774f3e2e23cda3b6?s=128

Armin Ronacher

July 07, 2017
Tweet

Transcript

  1. 2.

    Hi, I'm Armin ... and I do Open Source, lots

    of Python and SaaS Flask Sentry …
  2. 3.

    … and here is where you can find me twitter.com/@mitsuhiko

    github.com/mitsuhiko lucumr.pocoo.org/
  3. 4.

    800°C 36° 2' 0.4662" N 118° 15' 38.7792" W 795°C

    789°C 797°C 793°C 805°C 782°C we show you your crashes
  4. 5.
  5. 6.
  6. 30.
  7. 35.
  8. 38.

    from setuptools import setup, find_packages setup( name='example', version='0.0.1', packages=find_packages(), include_package_data=True,

    zip_safe=False, platforms='any', install_requires=[ 'snaek', ], snaek_rust_modules=[ ('example._native', 'rust/'), ] )
  9. 40.

    #[repr(C)] pub struct Point { pub x: f32, pub y:

    f32, } #[no_mangle] pub unsafe extern "C" fn example_get_origin() -> Point { Point { x: 0.0, y: 0.0 } }
  10. 43.

    #[derive(Serialize, Deserialize, Debug, Default)] pub struct Deploy { #[serde(rename="environment")] pub

    env: String, pub name: Option<String>, pub url: Option<String>, #[serde(rename="dateStarted")] pub started: Option<DateTime<UTC>>, #[serde(rename="dateFinished")] pub finished: Option<DateTime<UTC>>, }
  11. 44.

    /// Lists all deploys for a release pub fn list_deploys(&self,

    org: &str, version: &str) -> ApiResult<Vec<Deploy>> { self.get(&format!("/organizations/{}/releases/{}/deploys/", PathArg(org), PathArg(version)))? .convert() }