Skip to content

docs: add a compiled AutoIt porting example - #5

Merged
iagodpassos merged 2 commits into
iagodpassos:mainfrom
mgalore:docs/port-from-autoit
Sep 4, 2026
Merged

iagodpassos merged 2 commits into
iagodpassos:mainfrom
mgalore:docs/port-from-autoit

Conversation

@mgalore

@mgalore mgalore commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a safe port_from_autoit example that compares a representative AutoIt flow with its Rust equivalent
  • compile the Rust half to keep the API guidance current while the executable only prints
  • list the ninth example in the README

Closes #1

Verification

  • cargo test --workspace --features mock-loader
  • cargo run --example port_from_autoit
  • cargo clippy -p autoitx --example port_from_autoit --features mock-loader -- -D warnings
  • cargo fmt --all -- --check
  • ./scripts/check-readme-links.py
  • git diff --check

@iagodpassos

Copy link
Copy Markdown
Owner

Thanks for this — first outside PR on the repo, and a good one.

I ran the full battery locally before CI came back green: fmt, clippy
--all-targets --all-features, the test suite in both CI configurations,
MSRV 1.85 with --all-targets (the MSRV job doesn't cover examples, so I
checked by hand), the Windows cross-check, and a plain-Linux cargo check
with no features. That last one is worth calling out: your cfg gates do
exactly what the doc comment promises — this is now the only driving example
that compiles on a plain Linux host. The older examples don't, and that's
tracked in #6 now, not this PR's problem (though given your gates are the
template, it has your name on it if you want it).

One change before merge: the numbering inside compiled_port doesn't match
the printed comparison. In the code, // 1. is the typed text and // 4. is
win_wait_active; in COMPARISON, section 1 is the window wait and section 3
is the typing. Read side by side, the numbers cross-reference the wrong
blocks. Could you reorder the compiled block to the printed order — wait,
copy, type, click? That's also the order a real flow runs in.

Everything else is merge-ready as is.

@mgalore

mgalore commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up on the requested ordering: commit 7c460e4 reorders the compiled compiled_port block to exactly match the printed comparison: wait, copy, type, click.

Re-verified at the current PR head: cargo fmt --check, cargo test --all-targets --all-features (118 passed), cargo clippy --all-targets --all-features -- -D warnings, and cargo run --example port_from_autoit all succeed. The broad Linux cargo check --examples fails on upstream main as well because pre-existing non-mock examples require a Windows/macOS/mock-loader configuration.

@iagodpassos
iagodpassos merged commit 30bcf61 into iagodpassos:main Sep 4, 2026
8 checks passed
@iagodpassos

Copy link
Copy Markdown
Owner

Merged — thank you! First outside contribution to the crate, and it set the bar: verified claims, honest scope, and the only driving example that compiles everywhere. The examples table now has nine entries because of you.

If you feel like a second round, #6 is cut from the same cloth — your cfg gates here are literally the template it points to. No pressure either way, and thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a port_from_autoit example (AutoIt script beside the Rust)

2 participants