Giter Site home page Giter Site logo

holochain / app-spec-rust Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 6.0 7.8 MB

App Spec Rust HAS MOVED into holochain-rust repository!

Home Page: https://github.com/holochain/holochain-rust/tree/develop/app_spec

License: GNU General Public License v3.0

Shell 20.96% JavaScript 21.90% Rust 57.15%

app-spec-rust's Introduction

Project Discord License: CAL 1.0 Tests Twitter Follow

Holochain

Holochain is an open-source framework to develop peer-to-peer applications with high levels of security, reliability, and performance.

Code Status

This code is in initial Beta release. It's ready for limited production use. It is still undergoing security reviews and hardening of network protocols.

Running Holochain Applications (hApps)

This repository contains the Holochain core libraries, not the runtime intended for end-users of Holochain applications.

If you just want to install and run Holochain and apps from its AppStore, download the latest release of Holochain Launcher appropriate for Linux, Mac, or Windows.

Installing Holochain for App Development

Visit our developer portal at https://developer.holochain.org/install.

Contributing to Holochain (this repository)

Holochain is an open source project. We welcome all sorts of participation and are actively working on increasing surface area to accept it. Please see our contributing guidelines for our general practices and protocols on participating in the community, as well as specific expectations around things like code formatting, testing practices, continuous integration, etc.

Connect with us on Discord

License

Copyright (C) 2019 - 2024, Holochain Foundation

This program is free software: you can redistribute it and/or modify it under the terms of the license provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

app-spec-rust's People

Contributors

connoropolous avatar lucksus avatar sphinxc0re avatar staticallytypedanxiety avatar thedavidmeister avatar willemolding avatar zippy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app-spec-rust's Issues

rename `hash_entry` to something address related

child of #28

actually we don't necessarily hash an entry when we commit it.

address is simply a part of the AddressableContent trait that entries implement

for example:

  • AgentId has an address that includes several public keys in clear text
  • AgentStateSnapshot has a hardcoded address
  • hypothesised IdentityEntry is truly content addressable, the address is the content without any hashing

the primary use-case for hash_entry in the zomes API is not to create sha256 hashes but to retrieve previously stored data.

from @zippy

in any case what this should produce is exactly the value that would be returned if you had passed it into commit.

so i'm proposing we rename it to something like:

  • hdk::entry_address()
  • hdk::dht_address()
  • hdk::address()

use the known-good test entry, content and address for testing `hash_entry`

child of #28

holochain_core_types is full of fixtures/examples to aid testing

addresses change whenever the serialization format changes, which has happened a few times recently and will happen a few more times soon

using the testing functions means we only update the new address in one place, rather than chasing the same change around a dozen related crates

JS/Tape based tests

As Holochain core dev, I want to have runnable tests for the spec app so that we can set up automated checks against this spec.

This is about adding tests runnable by holoconsole that test this example app.

Autogen zome.json on build

Migrating issue here from holochain/hdk-rust#28

Rust supports a build.rs file which is build and executed before a package is built (https://doc.rust-lang.org/cargo/reference/build-scripts.html). This could parse the zome source files, locate the zome_functions! macros and write appropriate json output.

This does not help with identifying which functions belong to which capabilities. Some discussion on how to annotate zome functions with their capability and the membrane of that capability need to take place before auto generated zome.json is possible.

Compilation error when hdk dependency is set to "develop" (Cargo.toml)

Running hc package --output dist/app-spec-rust.hcpkg --strip-meta,
I have the following error:
expected struct 'hdk::holochain_core_types::json::JsonString', found enum 'serde_json::Value' - expected 'hdk::holochain_core_types::json::JsonString' because of return type.

See:
screenshot from 2018-11-08 14-06-04

But, if I change the lines related to hdk dependency, from develop branch to master branch, on these files: app-spec-rust/zomes/blog/code/Cargo.toml and app-spec-rust/zomes/blog/code/Cargo.toml, the compilation works fine.

Is it a working in progress update, related to serde_json replacement by JsonString?
I don't know if it is an important issue, but if it could be solved it were great for the experience of newcomers, like me :-).

CI running tests with holoconsole

As Holochain core dev, I want to see the result of each branch in the app-spec-rust repository being tested against the current master of Holochain so we now when a new specification in its separate branch is ready for merging into master (because corresponds to what Holochain's master can do).

instantiating an DNA twice fails

when calling const app = Container.loadAndInstantiate("dist/app-spec-rust.hcpkg") for a second time in a test in an attempt to get a clean app instance you will see the following error:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ErrorGeneric("Failed to create actor in system: Failed to create actor. Cause: An actor at the same path already exists")', libcore/result.rs:1009:5

This is probably a bug in holochain-rust...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.