Comments (3)
Thank you for sharing the current project status and the plan 🙂 It was really helpful to me to understand what I can do now.
Currently, Erlang modules must export an
init:boot/1
symbol that defines the entry point for executables.
I see. So, I edited the init.erl
file to rename start/0
function to boot/1
. And it worked!
--- a/native_implemented/otp/tests/internal/lib/erlang/display_1/with_atom/init.erl
+++ b/native_implemented/otp/tests/internal/lib/erlang/display_1/with_atom/init.erl
@@ -1,6 +1,6 @@
-module(init).
--export([start/0]).
+-export([boot/1]).
-import(erlang, [display/1]).
-start() ->
+boot(_) ->
display(atom).
$ ./bin/firefly compile native_implemented/otp/tests/internal/lib/erlang/display_1/with_atom/init.erl
Compiling native_implemented/otp/tests/internal/lib/erlang/display_1/with_atom/init.erl
Compiled init
Linker generated executable to ... /_build/firefly/x86_64-unknown-linux-gnu/init
Finished built init in 1s
$ file ./_build/firefly/x86_64-unknown-linux-gnu/init
./_build/firefly/x86_64-unknown-linux-gnu/init: ELF 64-bit LSB pie executable,
x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=5ea7145898756dc05bdcf6de3fcf2a40affc1e84,
for GNU/Linux 3.2.0, with debug_info, not stripped
$ ./_build/firefly/x86_64-unknown-linux-gnu/init
atom
I also realized that the CI job x86_64-unknown-linux-gnu-compiler
is running cargo make test-lit
regularly, and its test files in tests/lit
directory are up to date.
NOTE: The runtime is quite limited at the moment while I finalize the design for the GC and scheduler integrations, so you should expect that many basic things are missing.
I will be playing around with Firefly a bit more but I will try not to bother you until your work is done. Thank you for your hard work!
from firefly.
I'm glad you were able to get the sample program running! Always good to have someone else reproduce a successful build :)
I expect to have some updates soon that will open up the scope of what is possible quite a bit, but feel free to ask any questions you have in the meantime!
from firefly.
Currently, Erlang modules must export an init:boot/1
symbol that defines the entry point for executables. I'm currently working on a set of changes that ships a builtin init and treats Erlang sources more like erlc does, but this is just a side effect of building things up incrementally.
NOTE: The runtime is quite limited at the moment while I finalize the design for the GC and scheduler integrations, so you should expect that many basic things are missing. While you can compile pretty much any Erlang sources, linking will likely fail due to missing symbols as there is no standard library being built right now, it is truly bare bones Erlang. That won't be the case much longer, but just want to give you some context for your experimentation 😃
from firefly.
Related Issues (20)
- CMake >= 3.20 not supported HOT 1
- offset_of HOT 2
- Implementing ETS HOT 9
- Krustlet Provider HOT 2
- Build errors ^^^^^^^^ feature has been removed
- Project Status HOT 10
- Need help for applying lumen
- GraalVM HOT 2
- can't build lumen on linux using the latest nightly nor nightly-2022-07-12 HOT 3
- Write page explaining change from lumen to firefly. HOT 3
- Build errors ^^^^^^^^ use of unstable library feature 'core_c_str' HOT 2
- Docker images of working Firefly installation Please HOT 3
- Compiler will get segmentation fault for some kinds of `when` clauses on function HOT 1
- Some arithmetic expressions will not compile with error: failed to legalize operation 'cir.cast' HOT 1
- Overflow on a small integer causes a runtime error: `ImmediateOutOfRangeError`
- Error running example module on M1 HOT 1
- When will a precompiled toolchain package be available? HOT 2
- Can't build from source on develop HOT 2
- Elixir example? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firefly.