Skip to content

Contributing

உதவுறதுக்கு நன்றி. Bug reports, fixes, புதிய language support மற்றும் உண்மையான ports பத்தின கட்டுரைகள் எல்லாமே வரவேற்கப்படுது, ஒரு bug fix-க்கு pull request திறக்க முன்னாடியே கேட்கத் தேவையில்ல.

தொடங்குறதுக்கு முன்னாடி

  • ஒரு bug: நீங்க run பண்ண command, அதன் output, உங்க platform மற்றும் rust-anything version (rust-anything --version) கூட ஒரு issue திறங்க. ஒரு சின்ன repro project ரொம்ப உதவும்.
  • ஒரு பெரிய மாற்றம் (ஒரு புது language, ஒரு புது command, ஒரு unit அல்லது recording என்னங்கிறதுல மாற்றம்): நீங்க எழுதுறதுக்கு முன்னாடி வடிவத்துல ஒத்துப்போக முதல்ல ஒரு issue திறங்க. பழைய முடிவுகளுக்கான காரணங்கள் DECISIONS.md-ல இருக்கு.
  • ஒரு security பிரச்சனை: public issue திறக்காதீங்க; SECURITY.md பாருங்க.

Set up

உங்களுக்கு Rust (stable, 1.97 அல்லது அதுக்குப் புதியது) தேவை. Tests ஒவ்வொரு பகுதியும் கையாளுற language-ஐயும் run பண்ணும், runtime இல்லாத பகுதியை skip பண்ணும், அதனால நீங்க தொடுறவற்றை install பண்ணிக்கோங்க:

எதுக்கு Install பண்ணுங்க
TypeScript/JavaScript Node 24 (profile தவிர 22.6+ வேலை செய்யும்)
Python Python 3.9+
C ஒரு C compiler (cc)
Go Go 1.22+
Ruby Ruby 3.x
Java ஒரு JDK (17+)
PHP PHP 8
C# .NET SDK
PowerShell PowerShell 7.4+ (pwsh)
Swift Xcode அல்லது ஒரு Swift 5.9+ toolchain (swiftc)
wasm bridges rustup target add wasm32-unknown-unknown மற்றும் பொருத்தமான wasm-bindgen-cli
sh
git clone https://github.com/erkamyaman/rust-anything
cd rust-anything
git config core.hooksPath .githooks
cargo test

mise வச்சு, mise install CI பயன்படுத்துற அதே Rust, Node, Python, Go, Ruby மற்றும் Java versions-ஐக் கொண்டுவரும், மேலும் hk.pkl-ல உள்ள hk hooks-ஐ install பண்ணும் (மேல உள்ள secrets check, கூடவே ஒவ்வொரு commit-க்கு முன்னாடியும் cargo fmt மற்றும் cargo clippy). core.hooksPath வரிக்குப் பதிலா அதைப் பயன்படுத்துங்க.

cargo run -- doctor இந்த runtimes-ல எது உங்ககிட்ட இருக்கு, அவற்றோட versions, மற்றும் ஒவ்வொண்ணையும் install அல்லது update பண்ற command-ஐப் பட்டியலிடும். ஒரு இல்லாத runtime அதோட tests-ஐ skip பண்றதுக்குப் பதிலா fail ஆக்க (CI இதைத்தான் பண்ணுது), அதை RUST_ANYTHING_REQUIRE-ல குறிப்பிடுங்க, எ.கா. RUST_ANYTHING_REQUIRE=node,python3,go,ruby,java cargo test.

Hook scripts/check-secrets.sh-ஐ run பண்ணும், அது நீங்க commit பண்றதுல keys, tokens மற்றும் personal home-folder paths-ஐ மறுக்கும். CI இதை ஒவ்வொரு file-லயும் run பண்ணும்.

மாற்றத்தைச் செய்யுங்க

  • ஒவ்வொரு fix-உம் அது இல்லாம fail ஆகுற ஒரு test கூட வரணும். அப்படித் தான் ஆகுதான்னு உறுதிப்படுத்த பழைய code-க்கு எதிரா test-ஐ ஒரு தடவை run பண்ணுங்க.
  • Tests எங்க போகும்:
    • tests/analyze.rs: language detection, units, risks, dependencies, --whole-app.
    • tests/loop.rs: builds-க்குப் பதிலா stand-ins வச்சு ஒவ்வொரு language-க்கும் bridge, record, diff மற்றும் shadow.
    • tests/native.rs: உண்மையா build செய்யப்பட்ட bridges, அப்புறம் load ஆகி replay செய்யப்படுவது.
    • tests/end_state.rs: manifest-ல வைக்கப்படுற bridge --end-state, மற்றும் flag இல்லாம end state இல்லாதது.
    • tests/state_through_calls.rs: இன்னொரு function வழியா app state-ஐ எட்டுற function original-லயே இருக்குறது, pure மிச்சம் bridge ஆகுறது.
    • tests/app.rs மற்றும் tests/http.rs: CLIs மற்றும் servers-க்கான whole-app record, replay, front door மற்றும் lift.
    • tests/app_fresh.rs: app record --fresh, இங்க ஒவ்வொரு case-உம் ஒரு project folder-ஓட snapshot-ல இருந்து தொடங்கும்.
    • tests/app_stale.rs: மறுபடியும் record பண்றது case set-ஐ மாற்றும்; கையால எழுதிய ஒரு case வைக்கப்பட்டுப் பெயரிடப்படும்.
    • tests/library.rs: whole-library ports.
    • tests/effects.rs: output match ஆனாலும் ஒரு replay-ஐ fail ஆக்குற side effects (அனுப்பப்பட்ட mail, எழுதப்பட்ட rows).
    • tests/mime.rs: windows-1252 மற்றும் Latin-1-ல recording-க்காக decode செய்யப்பட்ட mail headers மற்றும் parts.
    • tests/fuzz.rs: fuzz மற்றும் record --pin-clock.
    • tests/sandbox.rs: record --sandbox மற்றும் app record --sandbox (network இல்ல, read-only source tree); bubblewrap அல்லது sandbox-exec run ஆக முடியாத இடத்துல skip ஆகும்.
    • tests/profile.rs: உண்மையான Python (cProfile) மற்றும் Node (--cpu-prof) workloads-ல profile.
    • tests/switch.rs: உண்மையான source files-ல enable மற்றும் disable.
    • tests/package.rs: package layouts மற்றும் install செய்யப்பட்ட ஒரு napi port.
    • tests/doctor.rs: doctor --json மற்றும் அதன் exit code.
    • tests/report.rs: நீங்க தொடங்க முடியாத units பத்தி plan என்ன சொல்லுதுங்கிறது.
    • tests/card.rs: build செய்யப்பட்ட ஒரு N-API crate-ல end to end report (card::report).
    • tests/port_map.rs: port map, upstream மாற்றங்கள் மற்றும் படிக்க முடியாத manifests.
    • tests/overloads.rs: மிச்சம் bridge ஆகும்போது Java, C# மற்றும் Kotlin overloads original-லயே வைக்கப்படுவது.
    • tests/error_resolution.rs: C# மற்றும் PHP exception class resolution (qualified, nested, fallback).
    • tests/tools.rs: MCP tools மற்றும் CLI ஒரே options-ஐ வெளிப்படுத்துவது, மற்றும் docs/tools.md tool list கூட match ஆகுறது.
    • tests/types_doc.rs: docs/types.md-ஓட ஒவ்வொரு row-உம் type mappings தர்றது கூட match ஆகுறது. ஒரு mapping மாறும்போது அங்க இருக்குற table-ஐ update பண்ணுங்க.
    • tests/plugin.rs: plugin crate version-லயே அதே skill மற்றும் MCP server-ஐ ship பண்ணுவது.
    • tests/skill.rs: skill பெயரிடுற ஒவ்வொரு command-உம் CLI-ல இருப்பது.
    • tests/rules.rs: rules --add ஒரு rule-க்கு ஒரு தடவை rust/RULES.md-ல append பண்ணுவது, ஒரு crate folder அதன் original-ஓட repository-க்குப் பதிலா நிற்பது, மற்றும் go எழுதுற agent prompt rules-ஐ எடுத்துட்டுப் போவது.
    • tests/recording.rs, tests/record_cwd.rs மற்றும் tests/record_timeout.rs: record ஒரு பழைய recording-ஐக் குறிச்சுக் காட்டுவது, working directory-ஐ அப்படியே விடுவது, மற்றும் ஒருபோதும் திரும்பி வராத ஒரு case-ஐ நிறுத்துவது.
    • tests/float_files.rs: tolerance-க்குள்ள ஒப்பிடப்படும் float files.
    • tests/c_pointers.rs மற்றும் tests/c_structs.rs: C buffers மற்றும் out-pointers, மற்றும் value-ஆ pass செய்யப்படுற அல்லது return செய்யப்படுற structs.
    • tests/go_internal_packages.rs, tests/go_mod_directives.rs, tests/go_module_paths.rs மற்றும் tests/go_record_cgo.rs: Go modules-ஐ record பண்றது (internal packages, go.mod directives, spaces கொண்ட versioned paths, cgo).
    • tests/go_unsigned.rs: Go uint64, uint மற்றும் uintptr port-ல அவற்றோட range-ஐத் தக்கவைத்துக் கொள்வது.
    • tests/java_package_declaration.rs மற்றும் tests/java_replay.rs: package declaration-ல comments கொண்ட Java recording, மற்றும் ஒரு நிராகரிக்கப்பட்ட argument-ல இருந்து null-ஐப் பிரிச்சுக் காட்டுற replay.
    • tests/ruby_recording.rs: encode செய்ய முடியாத Ruby results.
    • tests/powershell.rs: bridge, record, diff, gate மற்றும் enable செய்யப்பட்ட ஒரு PowerShell module; pwsh 7.4+ இல்லன்னா skip ஆகும்.
    • tests/swift.rs: bridge, record (ஒரு overflow trap மற்றும் throw ஆன errors உட்பட), diff மற்றும் gate செய்யப்பட்ட ஒரு SwiftPM target, diff-ல fail ஆக வேண்டிய ரெண்டு தவறான ports கூட; swiftc இல்லன்னா skip ஆகும்.
    • tests/untyped_js_types.rs: JSDoc அல்லது ஒரு sibling declaration file-ல இருந்து untyped JavaScript-க்கான types.
    • tests/android_device.rs: adb வழியா on-device recording; device இல்லன்னா skip ஆகும்.
    • tests/diff_before_build.rs: build செய்யாத crate-ல diff, bench மற்றும் fuzz, node, python அல்லது go-வை start பண்றதுக்கு முன்னாடியே "no built library ... (run rust-anything build <crate> first)"-ன்னு நிக்கும்.
    • tests/diff_missing_folder.rs மற்றும் tests/missing_crate.rs: இல்லாத ஒரு crate folder-ல run செய்யப்படுற commands (எ.கா. crate folder-ல manifest இல்லாதபோது diff record-ஐப் பரிந்துரைக்காதது, மற்றும் இல்லாத crate folder-ல disable, report மற்றும் shadow அந்த folder-ஐப் பெயரிட்டு முதல்ல bridge-ஐப் பரிந்துரைப்பது).
    • Unit tests code பக்கத்துலயே இருக்கும்.
  • Fixtures என்பவை tests/fixtures/ கீழ இருக்குற சின்ன apps. CLI மற்றும் HTTP fixtures எல்லா மொழிகளிலும் ஒரே commands மற்றும் routes-ஐ implement பண்ணும் (tcli upper|len|div|words|copy|now, /hello, /upper, /div/{a}/{b}, /now), அதனால ஒரு புது ஒண்ணை மத்தவற்றோட behavior-க்கு ஒண்ணே மாதிரி வச்சுக்கோங்க.
  • Generate ஆன code (rust-anything எழுதுற bridges, drivers மற்றும் front doors) clippy -D warnings-ஐயும் pass பண்ணணும், ஏன்னா பயனர்களின் crates-ல gate அதை run பண்ணும்.
  • Style: உங்களைச் சுத்தி இருக்குற code கூட பொருத்துங்க. Code-ஆல தானா சொல்ல முடியாததுக்கு மட்டும் comments வச்சுக்கோங்க, ஒரு மாற்றத்துக்கான காரணத்தைப் பதிலுக்கு pull request-ல போடுங்க.

ஒரு crate mapping சேர்க்க

analyze src/crates.toml-ல இருந்து code import பண்ற ஒவ்வொரு library-க்கும் Rust crate-ஐப் பெயரிடும். ஒண்ணைச் சேர்க்க, அதன் மொழி கீழ ஒரு entry-ஐ append பண்ணுங்க: names (துல்லியமான package பெயர்கள்) அல்லது prefixes (ஒரு பெயரோட தொடக்கம், Java மற்றும் C#-க்கு), crates, fit (good, partial அல்லது none) மற்றும் fit-க்கு விளக்கம் தேவைப்படும்போது ஒரு note. முதல்ல match ஆகுற entry தான் ஜெயிக்கும், அதனால அகலமான prefixes-க்கு முன்னாடி குறிப்பிட்டவற்றை வைங்க. Table-ல இல்லாத ஒரு library unknown-ஆ report செய்யப்படும்; ஒருபோதும் ஒரு crate-ஐ guess பண்ணாதீங்க.

ஒரு மொழியைச் சேர்க்க

PHP மற்றும் C# முதல்ல படிக்க வேண்டிய ரெண்டு commits-ல சேர்க்கப்பட்டுச்சு: e8ac243 (PHP) மற்றும் caea59a (C#). ஒரு புது மொழியும் அதே மாதிரி தொடங்கும்:

  1. src/lang/<name>.rs-ல ஒரு plugin: discovery, scan (imports மற்றும் risks), resolve மற்றும் exports, கூடவே src/crates.toml-ல [[<name>]] entries-ஆ அதன் libraries-ஓட crates.
  2. src/lang/mod.rs-ல detection மற்றும் dispatch.
  3. src/whole_app.rs-ல whole-app support: entry points, servers, declared dependencies.
  4. CLI மற்றும் HTTP fixtures, ஒரு library fixture, மற்றும் tests/analyze.rs, tests/app.rs மற்றும் tests/http.rs-ல tests.
  5. ஒரு bridge இருக்குற வரை அந்த மொழியோட units-ஐ ஒரு தெளிவான message-ஓட bridge மறுக்கும்.

README-ஐ மொழிபெயர்க்க

மொழிபெயர்ப்புகள் வரவேற்கப்படுது மற்றும் community-ஆல பராமரிக்கப்படுது. ரெண்டு பேர் ஒரே மொழியை எடுக்காம இருக்க #425-ல நீங்க எந்த மொழியை எடுக்குறீங்கன்னு சொல்லுங்க. ஒரு புது மொழிபெயர்ப்பு:

  1. docs/README_<CODE>.md-ல இருக்கும் (உதாரணமா docs/README_PT.md); root README.md ஆங்கிலத்திலேயே இருக்கும், அது ஒருபோதும் rename செய்யப்படவோ மொழிபெயர்க்கப்படவோ மாட்டாது (கீழே படி 4-ல சொல்லியிருக்குற தேவையான language link-ஐ மட்டும் சேர்க்கலாம்).
  2. docs/-ல இருந்து வேலை செய்யுற paths-ஐப் பயன்படுத்தும்: assets/logo.png, ../LICENSE-MIT, ../README.md.
  3. மத்த மொழிபெயர்ப்புகள் போலவே அதே language line கூட, அதன் சொந்த மொழியை plain text-ஆ வச்சுத் தொடங்கும், அதைத் தொடர்ந்து இது community-ஆல பராமரிக்கப்படுது மற்றும் English README-ஐ விடப் பின்தங்கியிருக்கலாம்ங்கிற குறிப்பு இருக்கும் (docs/README_DE.md-ல இருந்து copy பண்ணி மொழிபெயருங்க).
  4. README.md-லயும் ஒவ்வொரு மொழிபெயர்ப்புலயும் language line-ஓட கடைசியில போகும். அந்த வரி எப்பவுமே English, Türkçe, Українська-ன்னு தொடங்கும்; ஏற்கனவே பட்டியலிடப்பட்ட மொழிகளின் வரிசை மாறாது.

Pull request திறங்க

நீங்க push பண்றதுக்கு முன்னாடி:

sh
cargo fmt
cargo clippy --all-targets -- -D warnings
cargo test
  • என்ன தப்பா இருந்துச்சு, அதை எப்படி reproduce பண்றது, மாற்றம் அதை எப்படி fix பண்ணுதுன்னு சொல்லுங்க.
  • Issue-ஐ link பண்ணுங்க (Fixes #123).
  • உங்களால test பண்ண முடியாத எதையும் குறிப்பிடுங்க (வேற ஒரு OS, உங்ககிட்ட இல்லாத ஒரு runtime).
  • ஒரே மாற்றமா வச்சுக்கோங்க: ரெண்டு fixes ரெண்டு pull requests-ஆ review பண்ண ஈஸியா இருக்கும்.

CI Ubuntu, macOS மற்றும் Windows-ல run ஆகுது. Ubuntu check job-ல Node மற்றும் cargo இருக்கு (RUST_ANYTHING_REQUIRE=node,cargo); macOS Python, Go, Ruby, Java மற்றும் wasm-bindgen CLI-ஐச் சேர்க்கும். Windows cargo test --lib app::tests::shell_words, analyze, diff_missing_folder மற்றும் doctor suites (Windows-ஓட 1 MB main-thread stack-ல debug CLI) மற்றும் native bridge suite-ஐ மட்டுமே run பண்ணும்; cargo test-ஓட மிச்சம் Ubuntu மற்றும் macOS-ல மட்டுமே run ஆகுது, அதனால முடிஞ்சா CLI code-ல பண்ற ஒரு மாற்றத்தை Windows-ல நீங்களே check பண்ணுங்க. powershell job Ubuntu மற்றும் Windows-ல PowerShell tests-ஐ run பண்ணும், Ubuntu மற்றும் macOS images-லயும் pwsh இருக்கு. PHP, .NET மற்றும் Kotlin எங்கயும் install செய்யப்படல, அதனால அவற்றோட tests அங்க skip ஆகும்: அவற்றைத் தொடுற ஒரு மாற்றத்துக்கு முன்னாடி PATH-ல அவற்றோட local-ஆ cargo test run பண்ணுங்க (docs/STATUS.md, "Tests எங்க run ஆகுது"-ல அதே பிரிவு இருக்கு). ஒரு முதல் தடவை contributor-க்கு, CI run-ஐ ஒரு maintainer approve பண்ண GitHub காத்திருக்கும், அதனால checks தொடங்குறதுக்கு முன்னாடி ஒரு சின்ன தாமதத்தை எதிர்பாருங்க.

Pull requests அவற்றோட commits அப்படியே வைக்கப்பட்டு merge செய்யப்படும், அதனால உங்க history உங்களோடதாகவே இருக்கும். ஒரு மாற்றத்துக்குச் சின்ன சரிசெய்தல்கள் தேவைப்பட்டா, இன்னொரு round கேட்குறதுக்குப் பதிலா ஒரு maintainer மேல ஒரு commit சேர்க்கலாம்.

உங்க contribution-ஓட license

rust-anything பயனரின் விருப்பப்படி MIT அல்லது Apache-2.0 கீழ license செய்யப்பட்டது. நீங்க வெளிப்படையா வேற மாதிரி சொன்னாலன்றி, Apache-2.0 license-ல வரையறுக்கப்பட்டபடி rust-anything-ல சேர்க்க நீங்க வேண்டுமென்றே submit பண்ற எந்த contribution-உம் எந்தக் கூடுதல் நிபந்தனைகளும் இல்லாம மேல உள்ளபடி dual license செய்யப்படும்.

ஒரு real port-ஐப் பகிருங்க

என்ன வேலை செய்யுது மற்றும் என்ன உடையுதுங்கிறதுக்கு உண்மையான projects-ஓட ports தான் சிறந்த ஆதாரம். நீங்க உண்மையான எதுலயாவது rust-anything-ஐப் பயன்படுத்தியிருந்தா, அதை docs/real-world.md-ல சேர்க்குற ஒரு issue அல்லது pull request ரொம்ப வரவேற்கப்படுது. அந்த project, நீங்க run பண்ண commands, case counts, மற்றும் உங்களை ஆச்சரியப்படுத்திய எதையும் சேருங்க.

Code of conduct

பங்குபெறும் அனைவரும் code of conduct-ஐப் பின்பற்ற எதிர்பார்க்கப்படுது.

GitHub-ல இந்தப் பக்கத்தை edit பண்ணுங்க →