{"id":18016668,"url":"https://github.com/isfegu/samuel","last_synced_at":"2025-03-26T18:32:29.143Z","repository":{"id":87123492,"uuid":"582313633","full_name":"isfegu/samuel","owner":"isfegu","description":"A Morse code translator built with Rust and available in C++, Java, Node.js, Python and WebAssembly.","archived":false,"fork":false,"pushed_at":"2023-10-29T16:30:32.000Z","size":1031,"stargazers_count":3,"open_issues_count":17,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T20:38:11.608Z","etag":null,"topics":["java","javascript","nodejs","python","rust","typescript","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","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/isfegu.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":"2022-12-26T12:33:00.000Z","updated_at":"2024-06-12T13:22:28.000Z","dependencies_parsed_at":"2023-10-13T05:37:16.073Z","dependency_job_id":"9b962ab8-ff25-463a-ab3b-5f503fad718c","html_url":"https://github.com/isfegu/samuel","commit_stats":{"total_commits":47,"total_committers":1,"mean_commits":47.0,"dds":0.0,"last_synced_commit":"52a6204a71b3c95f675e42aa5cb622c5baa1e0fc"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isfegu%2Fsamuel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isfegu%2Fsamuel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isfegu%2Fsamuel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isfegu%2Fsamuel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isfegu","download_url":"https://codeload.github.com/isfegu/samuel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245713121,"owners_count":20660346,"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":["java","javascript","nodejs","python","rust","typescript","wasm","webassembly"],"created_at":"2024-10-30T04:18:57.710Z","updated_at":"2025-03-26T18:32:28.693Z","avatar_url":"https://github.com/isfegu.png","language":"C","readme":"# Samuel\n\nThe main goal of _Samuel_ is to be an excuse to learn how to use Rust to build a utility that can be used from other languages and multiple environments. The utility used as excuse is _DotHyphen_, a basic ASCII to [Morse](https://en.wikipedia.org/wiki/Morse_code) and vice versa translator.\n\nCurrently _Samuel_ can be used from:\n\n* __Rust__ as a crate.\n* __WebAssembly runtime__ as WebAssembly/WASI package.\n* __Javascript/Typescript__ as a:\n  * WebAssembly Node.js module.\n  * Native Node.js module.\n* __Python__ as a Wheel package.\n* __C/C++__ as an static lib.\n* __Java__ as a dynamic lib called using JNI and jar package.\n* __Terminal__ as a CLI.\n* \u003chttps://dothyphen.fermyon.app/\u003e as an HTTP EndPoint.\n* \u003chttps://dothyphen-shuttle.shuttleapp.rs\u003e as an HTTP EndPoint.\n\n## Repository structure\n\n_Samuel_ is a Cargo's [Workspace](https://doc.rust-lang.org/cargo/reference/workspaces.html), composed by the following members:\n\n* `dohy`: A CLI for _DotHyphen_.\n* `dothyphen`: A simple ASCII to Morse and vice versa translator and the core of Samuel project.\n* `dothyphen-c`: A C/C++ wrapper of _DotHyphen_.\n* `dothyphen-fermyon`: A rust wrapper of _DotHyphen_ to enable Fermyon Cloud deployment.\n* `dothyphen-java`: A Java wrapper of _DotHyphen_.\n* `dothyphen-napi`: A native Node.js module of _DotHyphen_.\n* `dothyphen-python`: A Python wrapper of _DotHyphen_.\n* `dothyphen-shuttle`: A rust wrapper of _DotHyphen_ to enable Shuttle Cloud deployment.\n* `dothyphen-wasi`: A WebAssembly wrapper of _DotHyphen_ ready to be used from a WebAssembly runtime.\n* `dothyphen-wasm`: A WebAssembly wrapper of _DotHyphen_.\n\nMoreover, you can find other relevant directories, like:\n\n* `.github`: Github actions workflows.\n* `demo`: Dummy projects to show how to use _Samuel_.\n  * `c++`: How to use _DotHyphen_ from a C++ project.\n  * `java`: How to use _DotHyphen_ from a Java project.\n  * `napi`: How to use _DotHyphen_ from a Node.js project using a native Node.js module.\n  * `python`: How to use _DotHyphen_ from a Python project.\n  * `wasm`\n    * `nodejs`: How to use _DotHyphen_ from a Node.js project.\n    * `npm`: How to use _DotHyphen_ from a Node.js project using a WebAssembly Node.js module.\n    * `web`: How to use _DotHyphen_ in a web page.\n* `tests`\n  * `c++`: C++ integration tests.\n  * `napi`: Node.js native module integration tests.\n  * `python`: Python integrations tests.\n  * `wasm/nodejs`: Node.js WebAssembly module integrations tests.\n\n## Contributing\n\nTo get information about how to contribute to _Samuel_, please, read the specific documentation of each Cargo's Workspace member:\n\n* `dohy` [CONTRIBUTING](./dohy/CONTRIBUTING.md) file.\n* `dothyphen` [CONTRIBUTING](./dothyphen/CONTRIBUTING.md) file.\n* `dothyphen-c` [CONTRIBUTING](./dothyphen-c/CONTRIBUTING.md) file.\n* `dothyphen-java` [CONTRIBUTING](./dothyphen-java/CONTRIBUTING.md) file.\n* `dothyphen-fermyon` [CONTRIBUTING](./dothyphen-fermyon/CONTRIBUTING.md) file.\n* `dothyphen-napi` [CONTRIBUTING](./dothyphen-napi/CONTRIBUTING.md) file.\n* `dothyphen-python` [CONTRIBUTING](./dothyphen-python/CONTRIBUTING.md) file.\n* `dothyphen-shuttle` [CONTRIBUTING](./dothyphen-shuttle/CONTRIBUTING.md) file.\n* `dothyphen-wasi` [CONTRIBUTING](./dothyphen-wasi/CONTRIBUTING.md) file.\n* `dothyphen-wasm` [CONTRIBUTING](./dothyphen-wasm/CONTRIBUTING.md) file.\n\nMoreover, you can use the _Samuel_ [Github Discussions](https://github.com/isfegu/samuel/discussions).\n\n### Requirements\n\nThe following requirements must be installed to contribute to each _Samuel_ Cargo's Workspace member:\n\n#### Common\n\n* Last stable Rust toolchain. Use [Rustup](https://rustup.rs/) to install it.\n\n#### dothyphen-c\n\n* [gcc](https://gcc.gnu.org/) or some C compiler.\n\n#### dothyphen-java\n\n* [maven](https://maven.apache.org/).\n* [Open JDK](https://openjdk.org/) or [JDK](https://www.oracle.com/java/technologies/downloads/)\n\n#### dothyphen-fermyon\n\n* The [Spin](https://developer.fermyon.com/spin) CLI.\n* [`wasm32-wasi` target](https://rust-lang.github.io/rustup/concepts/toolchains.html).\n\nRead the [official documentation](https://developer.fermyon.com/spin/install) to install Spin CLI.\n\n\u003e Info: In this documentation we assume Spin is installed inside `dothyphen-fermyon` directory.\n\n#### dothyphen-napi\n\n* [Node.js](https://nodejs.org).\n* [Yarm](https://yarnpkg.com/) or Npm (already installed with Node.js).\n\n#### dothyphen-python\n\n* [Python3](https://www.python.org).\n* [venv](https://docs.python.org/3/library/venv.html).\n\n#### dothyphen-shuttle\n\n* The [Shuttle](https://docs.shuttle.rs) CLI.\n\nRead the [official documentation](https://docs.shuttle.rs/introduction/installation) to install Shuttle CLI.\n\n\u003e Info: In this documentation we assume Shuttle CLI is installed globally.\n\n#### dothyphen-wasi\n\n* [Wasmtime](https://wasmtime.dev/).\n* [`wasm32-wasi` target](https://rust-lang.github.io/rustup/concepts/toolchains.html).\n\n#### dothyphen-wasm\n\n* [Wasm-pack](https://rustwasm.github.io/wasm-pack/installer/).\n* [`wasm32-unknown-unknown` target](https://rust-lang.github.io/rustup/concepts/toolchains.html).\n* [Node.js](https://nodejs.org).\n* [Yarm](https://yarnpkg.com/) or Npm (already installed with Node.js).\n\n### Guidelines\n\n* If you use Visual Studio Code, open the [samuel.code-workspace](./samuel.code-workspace) _workspace_ and install all recommended extensions.\n* Use [Conventional Commits](https://www.conventionalcommits.org).\n* Use [Feature Branch](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) creating a _pull request_ to _main_.\n* Use [Semantic Versioning](https://semver.org/). Each change done in any crate __MUST__ update the crate's version. Each crate have its own version number.\n* Add unit and integration testing whenever possible.\n\n### Unit testing\n\nTo execute the _Workspace_ unit tests, run:\n\n```bash\n~ cargo test\n```\n\nUnit tests will be executed automatically on a _pull request_ against _main_. See [`ci.yml`](./.github/workflows/ci.yml).\n\n### Integration testing\n\nUse integration testing to validate if _Samuel_ works on supported targets or platforms or languages.\n\n* Add the tests in the `tests` directory.\n* Use subdirectories to group tests by target or platform or language.\n* Use [`Makefile`](./Makefile) file to run the tests.\n\nIntegration tests will be executed automatically on a _pull request_ against _main_. See [`ci.yml`](./.github/workflows/ci.yml).\n\n### Publish\n\nAs a part of the research done in _Samuel_, all the code should be published in the appropriate language packages or cloud providers, like npmjs.com, crates.io, Fermyon Cloud or Shuttle Cloud.\n\nPublication must be done using the [Github Action Workflow](../.github/workflows/cd.yml).\n\n#### Versioning and Tags\n\nAll code updates of any Cargo's Workspace member must have a version number. This number can be different between members. Each version must be associated with a git tag therefore this tags will be used to publishing. These tags must be placed in the right commit and must be named using this pattern, `vX.Y.Z-\u003cmember\u003e`, for example:\n\n* `v0.1.0-dothyphen`\n* `v0.1.1-dothyphen-c`\n* `v0.2.0-dohy`\n\n## Usage\n\nTo get information about how to usage _Samuel_, please, read the specific documentation of each _Samuel_ Cargo's Workspace member:\n\n* `dohy` [README](./dohy/README.md) file.\n* `dothyphen` [README](./dothyphen/README.md) file.\n* `dothyphen-c` [README](./dothyphen-c/README.md) file.\n* `dothyphen-java` [README](./dothyphen-java/README.md) file.\n* `dothyphen-fermyon` [README](./dothyphen-fermyon/README.md) file.\n* `dothyphen-napi` [README](./dothyphen-napi/README.md) file.\n* `dothyphen-python` [README](./dothyphen-python/README.md) file.\n* `dothyphen-shuttle` [README](./dothyphen-shuttle/README.md) file.\n* `dothyphen-wasi` [README](./dothyphen-wasi/README.md) file.\n* `dothyphen-wasm` [README](./dothyphen-wasm/README.md) file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisfegu%2Fsamuel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisfegu%2Fsamuel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisfegu%2Fsamuel/lists"}