{"id":15394174,"url":"https://github.com/xyproto/machinecode","last_synced_at":"2025-04-15T23:52:50.828Z","repository":{"id":186951861,"uuid":"676062530","full_name":"xyproto/machinecode","owner":"xyproto","description":":vulcan_salute: Rust module and utility for executing machine code","archived":false,"fork":false,"pushed_at":"2024-08-28T03:07:34.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T03:02:19.216Z","etag":null,"topics":["assembly","jit","machinecode","programming-language","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-08T10:52:19.000Z","updated_at":"2024-08-28T03:07:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"21dd495c-78f9-4204-a4c9-63a176b964b8","html_url":"https://github.com/xyproto/machinecode","commit_stats":null,"previous_names":["xyproto/machinecode"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fmachinecode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fmachinecode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fmachinecode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fmachinecode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/machinecode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249010196,"owners_count":21197797,"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":["assembly","jit","machinecode","programming-language","rust"],"created_at":"2024-10-01T15:22:07.745Z","updated_at":"2025-04-15T23:52:50.809Z","avatar_url":"https://github.com/xyproto.png","language":"Rust","readme":"# Machinecode\n\nExecute machine code.\n\nThis repo includes both a Rust package and a utility called `jitrun`.\n\nIt was inspired by this post: [Hello, JIT World: The Joy of Simple JITs](http://blog.reverberate.org/2012/12/hello-jit-world-joy-of-simple-jits.html).\n\nFor a similar project written in Go, check out [jit](https://github.com/xyproto/jit).\n\n## Example use on x86_64\n\nReturn the number `42`:\n\n    cargo run -p jitrun -- examples/42.mc\n\nContents of `42.mc`:\n\n```\n// This program moves 42 into eax and returns\n\nb8 2a 00 00 00  // mov 0x2a000000 into the eax register. b8 is the \"mov eax\" part. 2a is 42.\nc3              // return to the caller (the return value is held in eax)\n```\n\nCalculate the square root of `1024`:\n\n    cargo run -p jitrun -- examples/sqrt.mc\n\nContents of `sqrt.mc`:\n\n```\n// This program takes the square root of 1024 and returns the answer (in eax), which is 32\n\nb8 00 04 00 00  // mov 1024 (0x0400) into eax (0x00 comes first and then 0x04, because it is little-endian)\nf3 0f 2a c0     // mov eax into the xmm0 register\nf3 0f 51 c0     // take the square root of the xmm0 register and place it into xmm0\nf3 0f 2c c0     // move xmm0 back into eax\nc3              // return to the caller (the return value is held in eax)\n\n```\n\n## General info\n\n* Version: 0.1.0\n* License: BSD-3\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fmachinecode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fmachinecode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fmachinecode/lists"}