├── axum ├── .gitignore ├── wrk_post.lua ├── Cargo.toml ├── README.md ├── src │ └── main.rs └── Cargo.lock ├── regex ├── .gitignore ├── Makefile ├── regex.py ├── regex.swift └── resuls ├── .gitignore ├── dart_axum_tokio ├── rust │ ├── src │ │ ├── api │ │ │ ├── mod.rs │ │ │ └── minimal.rs │ │ ├── lib.rs │ │ ├── frb_generated.web.rs │ │ ├── frb_generated.io.rs │ │ └── frb_generated.rs │ └── Cargo.toml ├── frb_generated.h ├── README.md ├── build.dart ├── lib │ ├── dart_axum_tokio_sever.dart │ └── src │ │ └── rust │ │ ├── api │ │ └── minimal.dart │ │ ├── frb_generated.web.dart │ │ ├── frb_generated.io.dart │ │ └── frb_generated.dart ├── analysis_options.yaml ├── wrk_post.lua ├── flutter_rust_bridge.yaml ├── pubspec.yaml ├── bin │ └── main.dart ├── .gitignore └── pubspec.lock ├── wrk_post.lua ├── .gitmodules ├── README.md ├── deno.ts ├── bun.ts ├── results ├── hello_world │ ├── node.log │ ├── bun.log │ ├── go.log │ ├── deno.log │ ├── dart_jit.log │ ├── axum_mt.log │ ├── axum_st.log │ ├── dart_aot.log │ ├── dart_axum_aot.log │ └── dart_axum_jit.log └── json_echo │ ├── node.log │ ├── bun.log │ ├── go.log │ ├── dart_jit.log │ ├── deno.log │ ├── axum_st_serde.log │ ├── axum_st_simd.log │ ├── axum_mt_serde.log │ ├── axum_mt_simd.log │ ├── dart_aot.log │ └── dart_axum_aot.log ├── go.go ├── node.js ├── dart.dart ├── benchmark.dart └── testdata └── posts.json /axum/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /regex/.gitignore: -------------------------------------------------------------------------------- 1 | regex_swift 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | output* 2 | 3 | **/*.exe 4 | -------------------------------------------------------------------------------- /dart_axum_tokio/rust/src/api/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod minimal; 2 | -------------------------------------------------------------------------------- /dart_axum_tokio/frb_generated.h: -------------------------------------------------------------------------------- 1 | // Nothing when using full_dep=false mode -------------------------------------------------------------------------------- /regex/Makefile: -------------------------------------------------------------------------------- 1 | 2 | regex_swift: regex.swift 3 | swiftc -Ounchecked -enable-bare-slash-regex $< -o $@ 4 | -------------------------------------------------------------------------------- /dart_axum_tokio/README.md: -------------------------------------------------------------------------------- 1 | # Dart + Axum + Tokio server 2 | 3 | Starts an Axum+Tokio HTTP server with "/" being served by a Dart callback. 4 | -------------------------------------------------------------------------------- /dart_axum_tokio/build.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_rust_bridge_utils/flutter_rust_bridge_utils.dart'; 2 | 3 | void main(List args) async => simpleBuild(args); 4 | -------------------------------------------------------------------------------- /wrk_post.lua: -------------------------------------------------------------------------------- 1 | wrk.method = "POST" 2 | wrk.headers["Content-Type"] = "application/json" 3 | 4 | file = io.open("testdata/posts.json", "rb") 5 | wrk.body = file:read("*a") 6 | -------------------------------------------------------------------------------- /axum/wrk_post.lua: -------------------------------------------------------------------------------- 1 | wrk.method = "POST" 2 | wrk.headers["Content-Type"] = "application/json" 3 | 4 | file = io.open("../testdata/posts.json", "rb") 5 | wrk.body = file:read("*a") 6 | -------------------------------------------------------------------------------- /dart_axum_tokio/lib/dart_axum_tokio_sever.dart: -------------------------------------------------------------------------------- 1 | export 'package:dart_axum_tokio_sever/src/rust/api/minimal.dart'; 2 | export 'package:dart_axum_tokio_sever/src/rust/frb_generated.dart'; 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dart_axum_tokio/vendor/flutter_rust_bridge"] 2 | path = dart_axum_tokio/vendor/flutter_rust_bridge 3 | url = https://github.com/fzyzcjy/flutter_rust_bridge.git 4 | -------------------------------------------------------------------------------- /dart_axum_tokio/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | analyzer: 2 | exclude: 3 | - rust/target/**.dart # contains dumped debug info, instead of normal code 4 | - vendor/flutter_rust_bridge/** 5 | -------------------------------------------------------------------------------- /dart_axum_tokio/rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod api; 2 | mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ 3 | -------------------------------------------------------------------------------- /dart_axum_tokio/wrk_post.lua: -------------------------------------------------------------------------------- 1 | wrk.method = "POST" 2 | wrk.headers["Content-Type"] = "application/json" 3 | 4 | file = io.open("../testdata/posts.json", "rb") 5 | wrk.body = file:read("*a") 6 | -------------------------------------------------------------------------------- /dart_axum_tokio/flutter_rust_bridge.yaml: -------------------------------------------------------------------------------- 1 | # See `pure_dart` example for comments on the configs 2 | rust_input: rust/src/api/**/*.rs 3 | dart_output: lib/src/rust 4 | c_output: frb_generated.h 5 | dump_all: true 6 | local: true 7 | -------------------------------------------------------------------------------- /regex/regex.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | msg = "FLRD0056B>OGFLR,qAS,LSZI2:/215553h4730.50N\\00757.08En000/000/A=001975 !W56! id3ED0056B -019fpm +0.0rot 22.5dB -9.0kHz gps1x1" 4 | 5 | N = 1000000 6 | pattern = re.compile(r'(?P