{"id":19320420,"url":"https://github.com/jlyonsmith/csharp_2_swift","last_synced_at":"2025-07-22T08:05:05.447Z","repository":{"id":143313288,"uuid":"48822110","full_name":"jlyonsmith/csharp_2_swift","owner":"jlyonsmith","description":"A tool for doing rough conversion of C# code to Swift","archived":false,"fork":false,"pushed_at":"2016-01-12T03:41:44.000Z","size":32,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-20T05:25:46.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlyonsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-30T22:31:11.000Z","updated_at":"2020-09-21T00:11:38.000Z","dependencies_parsed_at":"2023-03-17T17:15:38.168Z","dependency_job_id":null,"html_url":"https://github.com/jlyonsmith/csharp_2_swift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jlyonsmith/csharp_2_swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fcsharp_2_swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fcsharp_2_swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fcsharp_2_swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fcsharp_2_swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlyonsmith","download_url":"https://codeload.github.com/jlyonsmith/csharp_2_swift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fcsharp_2_swift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266455019,"owners_count":23931349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T01:28:50.084Z","updated_at":"2025-07-22T08:05:05.417Z","avatar_url":"https://github.com/jlyonsmith.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple C# to Swift Converter\n\nThis is a simple Ruby tool to aid in the conversion of C# to Swift. \n\nUnlike most of the commercial tools that I have tried, such as [Oxidizer](http://docs.elementscompiler.com/Tools/Oxidizer/) this tool is designed to be used one file at a time.  \n\nBecause no tool is yet powerful enough to truly convert an entire project without programmer assistance I wanted something that would get me 80% of the way there by dealing with most of the typing intensive tasks, letting me focus on the framework related issues.\n\nInstall the tool with:\n\n```bash\ngem install csharp_2_swift\n```\n\n**IMPORTANT:** You need to untabify your source code before running the tool.  For now, `csharp_2_swift` assumes multiples of 4 spaces as the indentation level.  You can use `spacer` from my [code_tools](https://rubygems.org/gems/code_tools) Gem to achieve that, like so:\n\n```bash\nspacer -mode spaces -t 4 -r SomeCode.cs\n```\n\nThen run it on some C# code like so:\n\n```bash\ncsharp_2_swift -o SomeCode.swift SomeCode.cs\n```\n\nLet me know how you get on!\n\n## Development\n\nThis stuff is mostly here as a reminder to me.  It really needs to go in the `Rakefile`.\n\n### Debugging\n\nBecause of the standard Ruby directory layout, running the tools from the command line requires a little more effort:\n\n```bash\nruby -e 'load($0=ARGV.shift);CSharp2Swift.new.execute(ARGV)' -- lib/csharp_2_swift.rb --help\n```\n\n### Publishing\n\nHere's what you need to do to publish a Ruby gem.  First time only:\n\n```bash\ncurl -u \u003cyourname\u003e https://rubygems.org/api/v1/api_key.yaml \u003e ~/.gem/credentials; chmod 0600 ~/.gem/credentials\n```\n\nThen, in the case of these tools:\n\n```bash\ngem build csharp_2_swift.gemspec\ngem push csharp_2_swift-\u003cversion\u003e.gem\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlyonsmith%2Fcsharp_2_swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlyonsmith%2Fcsharp_2_swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlyonsmith%2Fcsharp_2_swift/lists"}