This short doc shows how to build rust to be used by flutter/android app.
Inspired by hyousef's work but added some details for the workflow.
Docs:
defmodule Day14 do | |
use Bitwise | |
@moduledoc false | |
@input File.read!("lib/input") | |
def process(version \\ 1) do | |
@input | |
|> String.split("mask = ", trim: true) | |
|> Enum.map(fn line -> process_line(line, version) end) |
fn run(font_path: &Path) -> Result<(), String> { | |
let sdl_context = sdl2::init()?; | |
let video_subsys = sdl_context.video()?; | |
let ttf_context = sdl2::ttf::init().map_err(|e| e.to_string())?; | |
let mut window = video_subsys | |
.window("SDL2_TTF Example", SCREEN_WIDTH, SCREEN_HEIGHT) | |
.position_centered() | |
.opengl() | |
.build() |
ruby-prof alphametics_test.rb git--ruby-- alphametics alphametics | |
Run options: --seed 39907 | |
# Running: | |
SSSS.SSSS | |
Finished in 1.130771s, 7.9592 runs/s, 0.8844 assertions/s. | |
9 runs, 1 assertions, 0 failures, 0 errors, 8 skips |