{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/holochain/hdk-rust/pulls/1","id":209365882,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MzY1ODgy","html_url":"https://github.com/holochain/hdk-rust/pull/1","diff_url":"https://github.com/holochain/hdk-rust/pull/1.diff","patch_url":"https://github.com/holochain/hdk-rust/pull/1.patch","issue_url":"https://api.github.com/repos/holochain/hdk-rust/issues/1","number":1,"state":"closed","locked":false,"title":"218 wasm globals + full API stubs","user":{"login":"ddd-mtl","id":34140573,"node_id":"MDQ6VXNlcjM0MTQwNTcz","avatar_url":"https://avatars3.githubusercontent.com/u/34140573?v=4","gravatar_id":"","url":"https://api.github.com/users/ddd-mtl","html_url":"https://github.com/ddd-mtl","followers_url":"https://api.github.com/users/ddd-mtl/followers","following_url":"https://api.github.com/users/ddd-mtl/following{/other_user}","gists_url":"https://api.github.com/users/ddd-mtl/gists{/gist_id}","starred_url":"https://api.github.com/users/ddd-mtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddd-mtl/subscriptions","organizations_url":"https://api.github.com/users/ddd-mtl/orgs","repos_url":"https://api.github.com/users/ddd-mtl/repos","events_url":"https://api.github.com/users/ddd-mtl/events{/privacy}","received_events_url":"https://api.github.com/users/ddd-mtl/received_events","type":"User","site_admin":false},"body":"**Must sync PR with same named PR in `holochain-rust`**\r\n\r\n## Overview\r\nPR on workflow for having globals done at `start()` before any wasm function call.\r\nAdded `wasm-test` for testing global app values retrieval from ribosome.\r\nAdded specs for non-compiling api usage example\r\nAll public API is in `lib.rs`, including globals\r\nPrivate globals and functions are in separate files.\r\nAdded a global variable for the SinglePageStack so as not to pass it around in every function argument. The idea is to have the `_dispatch` functions auto-generated with code that sets this global variable at start.\r\n\r\nImplemented the `debug()` API function.\r\n\r\n\r\n## How global variable works\r\nWhen calling the requested zome function, lazy_statics makes it so that `init_globals` zome api function gets called before. \r\n`init_globals` zome api function gets the values of the global app variables from the ribosome.\r\nlazy_statics are set so as to be available directly in zome as constants (ex: `hdk::APP_NAME`)\r\n\r\n## API changes\r\n### Functions\r\n- More descriptive function names so devs don't have to guess what it does and removes ambiguity. ex: `update()` -> `update_entry()`\r\n- Reordered `link` arguments. From `from, tag, to` To `from, to, tag` which is the most common pattern.\r\n- Renamed some functions so as to always start with a verb, otherwise its confusing as nouns are for accessors. ex: `bundle_close()` -> `close_bundle()`\r\n\r\n### App Globals\r\nRenamed most app globals so as to be less confusing and have coherence between them and hcadmin.\r\nex: `APP_AGENT_STR` -> `APP_AGENT_ID_STR`\r\nex: `APP_AGENT_HASH` -> `APP_AGENT_INITIAL_HASH`\r\nex: `APP_AGENT_TOP_HASH` -> `APP_AGENT_LATEST_HASH`\r\n\r\n","created_at":"2018-08-19T15:38:06Z","updated_at":"2018-08-26T17:50:26Z","closed_at":"2018-08-26T17:50:26Z","merged_at":"2018-08-26T17:50:26Z","merge_commit_sha":"5f570b5dc60a0e7984bebc1f005bbd55da3722c7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/holochain/hdk-rust/pulls/1/commits","review_comments_url":"https://api.github.com/repos/holochain/hdk-rust/pulls/1/comments","review_comment_url":"https://api.github.com/repos/holochain/hdk-rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/holochain/hdk-rust/issues/1/comments","statuses_url":"https://api.github.com/repos/holochain/hdk-rust/statuses/17892494d47b27cc1cbf5519c45ef8460e8d4feb","head":{"label":"holochain:218-wasm-globals","ref":"218-wasm-globals","sha":"17892494d47b27cc1cbf5519c45ef8460e8d4feb","user":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"repo":{"id":143774357,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3NzQzNTc=","name":"hdk-rust","full_name":"holochain/hdk-rust","owner":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/holochain/hdk-rust","description":"The Holochain Development Kit for Rust based Holochain apps","fork":false,"url":"https://api.github.com/repos/holochain/hdk-rust","forks_url":"https://api.github.com/repos/holochain/hdk-rust/forks","keys_url":"https://api.github.com/repos/holochain/hdk-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holochain/hdk-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holochain/hdk-rust/teams","hooks_url":"https://api.github.com/repos/holochain/hdk-rust/hooks","issue_events_url":"https://api.github.com/repos/holochain/hdk-rust/issues/events{/number}","events_url":"https://api.github.com/repos/holochain/hdk-rust/events","assignees_url":"https://api.github.com/repos/holochain/hdk-rust/assignees{/user}","branches_url":"https://api.github.com/repos/holochain/hdk-rust/branches{/branch}","tags_url":"https://api.github.com/repos/holochain/hdk-rust/tags","blobs_url":"https://api.github.com/repos/holochain/hdk-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holochain/hdk-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holochain/hdk-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/holochain/hdk-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holochain/hdk-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/holochain/hdk-rust/languages","stargazers_url":"https://api.github.com/repos/holochain/hdk-rust/stargazers","contributors_url":"https://api.github.com/repos/holochain/hdk-rust/contributors","subscribers_url":"https://api.github.com/repos/holochain/hdk-rust/subscribers","subscription_url":"https://api.github.com/repos/holochain/hdk-rust/subscription","commits_url":"https://api.github.com/repos/holochain/hdk-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/holochain/hdk-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/holochain/hdk-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/holochain/hdk-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/holochain/hdk-rust/contents/{+path}","compare_url":"https://api.github.com/repos/holochain/hdk-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holochain/hdk-rust/merges","archive_url":"https://api.github.com/repos/holochain/hdk-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holochain/hdk-rust/downloads","issues_url":"https://api.github.com/repos/holochain/hdk-rust/issues{/number}","pulls_url":"https://api.github.com/repos/holochain/hdk-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/holochain/hdk-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/holochain/hdk-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holochain/hdk-rust/labels{/name}","releases_url":"https://api.github.com/repos/holochain/hdk-rust/releases{/id}","deployments_url":"https://api.github.com/repos/holochain/hdk-rust/deployments","created_at":"2018-08-06T19:36:55Z","updated_at":"2018-08-20T13:55:52Z","pushed_at":"2018-08-26T17:50:26Z","git_url":"git://github.com/holochain/hdk-rust.git","ssh_url":"git@github.com:holochain/hdk-rust.git","clone_url":"https://github.com/holochain/hdk-rust.git","svn_url":"https://github.com/holochain/hdk-rust","homepage":null,"size":33,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"holochain:master","ref":"master","sha":"a05533e96070dffa442061a038262c6f3cbcebe1","user":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"repo":{"id":143774357,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3NzQzNTc=","name":"hdk-rust","full_name":"holochain/hdk-rust","owner":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/holochain/hdk-rust","description":"The Holochain Development Kit for Rust based Holochain apps","fork":false,"url":"https://api.github.com/repos/holochain/hdk-rust","forks_url":"https://api.github.com/repos/holochain/hdk-rust/forks","keys_url":"https://api.github.com/repos/holochain/hdk-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holochain/hdk-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holochain/hdk-rust/teams","hooks_url":"https://api.github.com/repos/holochain/hdk-rust/hooks","issue_events_url":"https://api.github.com/repos/holochain/hdk-rust/issues/events{/number}","events_url":"https://api.github.com/repos/holochain/hdk-rust/events","assignees_url":"https://api.github.com/repos/holochain/hdk-rust/assignees{/user}","branches_url":"https://api.github.com/repos/holochain/hdk-rust/branches{/branch}","tags_url":"https://api.github.com/repos/holochain/hdk-rust/tags","blobs_url":"https://api.github.com/repos/holochain/hdk-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holochain/hdk-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holochain/hdk-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/holochain/hdk-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holochain/hdk-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/holochain/hdk-rust/languages","stargazers_url":"https://api.github.com/repos/holochain/hdk-rust/stargazers","contributors_url":"https://api.github.com/repos/holochain/hdk-rust/contributors","subscribers_url":"https://api.github.com/repos/holochain/hdk-rust/subscribers","subscription_url":"https://api.github.com/repos/holochain/hdk-rust/subscription","commits_url":"https://api.github.com/repos/holochain/hdk-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/holochain/hdk-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/holochain/hdk-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/holochain/hdk-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/holochain/hdk-rust/contents/{+path}","compare_url":"https://api.github.com/repos/holochain/hdk-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holochain/hdk-rust/merges","archive_url":"https://api.github.com/repos/holochain/hdk-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holochain/hdk-rust/downloads","issues_url":"https://api.github.com/repos/holochain/hdk-rust/issues{/number}","pulls_url":"https://api.github.com/repos/holochain/hdk-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/holochain/hdk-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/holochain/hdk-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holochain/hdk-rust/labels{/name}","releases_url":"https://api.github.com/repos/holochain/hdk-rust/releases{/id}","deployments_url":"https://api.github.com/repos/holochain/hdk-rust/deployments","created_at":"2018-08-06T19:36:55Z","updated_at":"2018-08-20T13:55:52Z","pushed_at":"2018-08-26T17:50:26Z","git_url":"git://github.com/holochain/hdk-rust.git","ssh_url":"git@github.com:holochain/hdk-rust.git","clone_url":"https://github.com/holochain/hdk-rust.git","svn_url":"https://github.com/holochain/hdk-rust","homepage":null,"size":33,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/holochain/hdk-rust/pulls/1"},"html":{"href":"https://github.com/holochain/hdk-rust/pull/1"},"issue":{"href":"https://api.github.com/repos/holochain/hdk-rust/issues/1"},"comments":{"href":"https://api.github.com/repos/holochain/hdk-rust/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/holochain/hdk-rust/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/holochain/hdk-rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/holochain/hdk-rust/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/holochain/hdk-rust/statuses/17892494d47b27cc1cbf5519c45ef8460e8d4feb"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"ddd-mtl","id":34140573,"node_id":"MDQ6VXNlcjM0MTQwNTcz","avatar_url":"https://avatars3.githubusercontent.com/u/34140573?v=4","gravatar_id":"","url":"https://api.github.com/users/ddd-mtl","html_url":"https://github.com/ddd-mtl","followers_url":"https://api.github.com/users/ddd-mtl/followers","following_url":"https://api.github.com/users/ddd-mtl/following{/other_user}","gists_url":"https://api.github.com/users/ddd-mtl/gists{/gist_id}","starred_url":"https://api.github.com/users/ddd-mtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddd-mtl/subscriptions","organizations_url":"https://api.github.com/users/ddd-mtl/orgs","repos_url":"https://api.github.com/users/ddd-mtl/repos","events_url":"https://api.github.com/users/ddd-mtl/events{/privacy}","received_events_url":"https://api.github.com/users/ddd-mtl/received_events","type":"User","site_admin":false},"comments":5,"review_comments":27,"maintainer_can_modify":false,"commits":16,"additions":454,"deletions":17,"changed_files":9}}
{"actor":{"display_login":"ddd-mtl"}}