| Crates.io | skia-rs-ffi |
| lib.rs | skia-rs-ffi |
| version | 0.2.0 |
| created_at | 2026-01-02 21:13:01.6796+00 |
| updated_at | 2026-01-03 18:48:20.542357+00 |
| description | C FFI bindings for skia-rs |
| homepage | https://github.com/pegasusheavy/skia-rs |
| repository | https://github.com/pegasusheavy/skia-rs |
| max_upload_size | |
| id | 2019207 |
| size | 77,457 |
C FFI bindings for skia-rs, a pure Rust implementation of the Skia 2D graphics library.
.a or .so/.dll# Build static library
cargo build -p skia-rs-ffi --release
# Output: target/release/libskia_rs_ffi.a
#include "skia-rs.h"
int main() {
// Create a surface
sk_surface_t* surface = sk_surface_new_raster_n32_premul(800, 600);
sk_canvas_t* canvas = sk_surface_get_canvas(surface);
// Create a paint
sk_paint_t* paint = sk_paint_new();
sk_paint_set_color(paint, 0xFFFF6B35);
sk_paint_set_antialias(paint, true);
// Draw a rectangle
sk_rect_t rect = { 100, 100, 700, 500 };
sk_canvas_draw_rect(canvas, &rect, paint);
// Cleanup
sk_paint_delete(paint);
sk_surface_delete(surface);
return 0;
}
MIT OR Apache-2.0
See the main repository for more information.