{"id":19082410,"url":"https://github.com/thomasmodeneis/jgo","last_synced_at":"2025-04-30T08:23:54.640Z","repository":{"id":32958325,"uuid":"36562248","full_name":"thomasmodeneis/jgo","owner":"thomasmodeneis","description":"The JGo - Java Compiler and Runtime environment for Golang ","archived":false,"fork":false,"pushed_at":"2015-06-01T16:51:57.000Z","size":835,"stargazers_count":137,"open_issues_count":6,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-18T23:59:38.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasmodeneis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-30T14:51:21.000Z","updated_at":"2025-03-25T04:23:43.000Z","dependencies_parsed_at":"2022-07-20T12:17:39.389Z","dependency_job_id":null,"html_url":"https://github.com/thomasmodeneis/jgo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasmodeneis%2Fjgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasmodeneis%2Fjgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasmodeneis%2Fjgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasmodeneis%2Fjgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasmodeneis","download_url":"https://codeload.github.com/thomasmodeneis/jgo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251667277,"owners_count":21624459,"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","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-09T02:43:12.078Z","updated_at":"2025-04-30T08:23:54.620Z","avatar_url":"https://github.com/thomasmodeneis.png","language":"Scala","funding_links":[],"categories":["JVM语言"],"sub_categories":[],"readme":"Description\n===========\n\n![JGO](http://jgo.herokuapp.com/images/jgo3.png) The [JGo Project](http://jgo.herokuapp.com/) aims to provide a complete compiler and runtime environment for the Go programming language to/on the Java Virtual Machine.\nThe jgoc compiler is written in Scala and the runtime in Java.\n\n\nDrone.io continuous integration service\n---------------------------------------\n\n[![Build Status](https://drone.io/github.com/thomasmodeneis/jgo/status.png)](https://drone.io/github.com/thomasmodeneis/jgo/latest)\n\n\nGitter Chat\n-----------\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/thomasmodeneis/jgo?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nWhy the JVM?\n============\n\nThe selection of the JVM was motivated by:\n\nCompatibility \u0026 JVM debug/profiling\n------------------------------------\n\nA lot of excellent libraries are written for the JVM. \n[JGo](http://jgo.herokuapp.com/) hopes to make existing Go users more productive by enabling them to use these. \nFurthermore, many groups have large codebases written in Java, Scala, and other JVM languages. \n[JGo](http://jgo.herokuapp.com/) is an attempt to bring these groups into the fold, group and expose them.\n\n![JGO](http://jgo.herokuapp.com/images/banner_jgo.png)\n\nStatus of the Project\n=====================\n\nJGo is a work in progress. \nMany features of the Go programming language are not yet fully supported. \n\nCurrently, these include:\n\n* Structs; (nearing completion)\n* Methods;\n* Packages and multi-file compilation;\n* Interfaces;\n* Lambda expressions;\n* Closures (sub-feature of lambda expressions);\n* Concurrency;\n* defer, panic, and recover; and Switch statements.\n\nDOCS\n=====\n\n[JGO-DOCS](http://jgo.herokuapp.com/api/)\n\n\nContribute\n==========\n\nContributing to JGO\n=========================================\n\nJGO welcomes contributions, feel free to play and pull requests :)\n\nIssues\n------\n\nFeel free to submit issues and enhancement requests.\n\nContributing\n------------\n\nPlease refer to each project's style guidelines and guidelines for submitting patches and additions. In general, we follow the \"fork-and-pull\" Git workflow.\n\n 1. Fork the repo on GitHub\n 2. Raise a issue on our issue tracker\n 3. Commit changes to a branch in your fork using the issue, eg: git commit -m \"#1\"\n 4. Pull request with your changes\n 5. Thank you o/\n\nNOTE: Be sure to merge the latest from \"upstream\" before making a pull request!\n\nThis project contains a Ubuntu 12.04 Sandbox, a vagrant [Vagrant](http://vagrantup.com/)- based Puppet\ndevelopment environment used for running and testing JGo with the OpenJDK 8 modules.\n\n\n\nOpenJDK\n========\n\n![OpenJDK](https://soujavablog.files.wordpress.com/2015/05/openjdk.jpg)\nJGO Uses OpenJDK 8.\n\n\nRequirements\n============\n\nTo use this, you must have the following items installed and working:\n\n* [VirtualBox](https://www.virtualbox.org/)\n* [Vagrant 1.7+](http://vagrantup.com/)\n\nUsage\n=====\n\nInitial Startup\n---------------\n\nTo bring up the Puppet Sandbox environment, issue the following command:\n\n```vagrant up```\n\nPuppet will install Git and OpenJDK 8.\n\n```vagrant ssh```\n\nRun SBT\n-------\n\nWhen the shell command for vagrant is ready run sbt\n\n```\n$ cd /opt/jgo/\n$ sbt\nGetting org.scala-sbt sbt 0.13.8 ...\n[info] Set current project to jgo (in build file:/opt/jgo/)\n```\n\n```\n\u003e run hello.go package.class\n[info] Updating {file:/opt/jgo/}jgo...\n[info] Resolving org.fusesource.jansi#jansi;1.4 ...\n[info] Done updating.\n```\n\nRun SBT Command\n---------------\n\nWhen the command line for sbt shows type run hello.go package.class\nThis will compile and execute the following go code into the JDK8:\n```\nfunc say(msg string) {\n\tprint msg\n}\nfunc main(args [4]string) {\n\tmsg := \"hello, world\"\n\tsay(msg)\n\t\n\tfor i := 0; i \u003c 10; i++ {\n\t\tprint i\n\t}\n}\n```\n\n\nOutput:\n```\n\u003e run hello.go package.class\n[info] Updating {file:/opt/jgo/}jgo...\n(...)\n[info] Compiling 132 Scala sources and 17 Java sources to /opt/jgo/target/scala-2.10/classes...\n(...)\n[info] Running jgo.tools.compiler.Main hello.go package.class\nLoadVar \u003cmsg: string\u003e\nPrintString\nDecl \u003cmsg: string\u003e\nPushStr \"hello, world\"\nStoreVar \u003cmsg: string\u003e\nLoadVar \u003cmsg: string\u003e\nInvokeFunction Function(say, func(string))\nDecl \u003ci: int\u003e\nPushInt 0, I32\nStoreVar \u003ci: int\u003e\ngoto:  [cond of for 5]\nLbl top of for 5\nLoadVar \u003ci: int\u003e\nPrintNumeric I32\nLbl continue 5\nIncr \u003ci: int\u003e, 1, I32\nLbl cond of for 5\nLoadVar \u003ci: int\u003e\nPushInt 10, I32\nif \u003c I32:  [top of for 5]\nLbl break 5\nUndecl \u003ci: int\u003e\nUndecl \u003cmsg: string\u003e\n```\n\nLicense\n=======\n\n\nGNU 3\n-----\n\nGNU General Public License, version 3.\n\n\nProject migrated from https://code.google.com/p/jgo/ by  Harrison Klaperman.\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasmodeneis%2Fjgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasmodeneis%2Fjgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasmodeneis%2Fjgo/lists"}